Saturday, December 15, 2012

Why the move from WCF to ASP.NET Web API?


Web Services (SOAP) to WCF (SOAP + WS-*) to WCF 3.5 (SOAP+ WS-* + HTTP request - WebHttpBinding) to WCF REST Starter Kit (REST part of WCF) to WCF Web API to ASP.NET Web API (Moved away from WCF to ASP.NET MVC)

As REST/ HTTP services start getting popular around .NET 3.5 time frame, Microsoft introduces features - WebHttpBinding  part of WCF 3.5 and WCF REST Starter Kit to create RESTful services. The REST starter kit tries to enrich the support of WCF 3.5 for HTTP services.
 
WCF 4.0 and 4.5 introduces few other feature set along with WCF Web API and tries to simplify the development of HTTP / Restful services.  Check this post - http://arunmvp.blogspot.com/2011/07/whats-new-in-wcf-40.html  on the .NET 4.0 features. But the key challenge is WCF is built on top of SOAP stack and treats HTTP as a transport instead of as an application protocol. ASP.NET Web API is all about HTTP and moreover already one can start develop a service which can return JSON from an ASP.NET MVC controller.
End of the day, ASP.NET provides a first class support for HTTP programming model and it make sense and easy for Microsoft to build Web API’s in ASP.NET MVC world rather than in WCF world.

1 comment:

ASP.Net Migration said...

Great posting about migration from wcf to asp.net