Lev
Lev

Reputation: 3924

SOA style architecture with ASP.NET Web Api suggestions

Can you give me some examples of service oriented system built in Web Api? Currently I'm thinking about 2 approaches:

If I choose the second method I have following advantages: each developer in my team can "publish" own services without touching WebApi, only copying their project's dll-s in "Plugins Folder". Also routing and Api discovery is very easy in this case, sample routing - {Application/ServiceName}/{version}/{controller}/{action}/{id}. I have centralized security control over system and etc.

Any suggestion or samples and tutorials will be appreciated.

I know SOA is platform and technology independent, but I didn't think better title.

Upvotes: 2

Views: 2908

Answers (2)

John VandenBrook
John VandenBrook

Reputation: 103

You won't find too many articles on the web describing SOA using ASP.NET Web API, which I love using. Don't get caught up in comparisons between Web API and WCF, either (with the possible exception of REST aspects of WCF, but why bother, use Web API in such cases). A nice discussion is going on at ASP.NET Core with respect to WCF, https://github.com/dotnet/wcf/issues/1200. Keep an eye open for future .NET releases and WCF implemented features, regardless of how it is marketed.

I think you should be asking yourself if you want/need to host services in an SOA environment. Large companies, such as Insurance companies, that share APIs and do so behind a firewall will typically use SOA. If you don't need proxies to call into services which exist on application servers, you may not need a complex architecture. In this case ASP.NET Web API is probably a perfect solution. If you will be developing in a typical SOA environment, I would recommend WCF and .NET 4.6.2 for now, with future .NET releases to support WCF.

Upvotes: 0

TGH
TGH

Reputation: 39248

Advantages of hosting the services as separate web applications are that they can scale independently and be on different release cycles. Other considerations though are cross domain issues if you are making ajax requests to your services. If they are hosted separately they will be on different domains, which means you have to do something like CORS, JSONP or reverse proxy to allow ajax request from the browser.

Upvotes: 1

Related Questions