ASP.NET MVC – Impact of RPC Style Communication on WCF

asp.net-mvcnetwcfweb services

From http://www.microsoft.com/download/en/details.aspx?id=28942

ASP.NET MVC 4 also includes ASP.NET Web API, a framework for building
and consuming HTTP services that can reach a broad range of clients
including browsers, phones, and tablets. ASP.NET Web API is great for
building services that follow the REST architectural style, plus it
supports RPC patterns.

If ASP.NET MVC 4 supports RPC style communication what does that mean for WCF?

On what basis should we chose to use WCF or ASP.NET MVC Web API's RPC mechanism?

Best Answer

Nothing. You're still free to use WCF where it is most suitable, or at your own discretion.

ASP.NET MVC has supported a RESTful communication style since its inception, and many people use it as a thin veneer for RESTful services. That doesn't automatically cause WCF to go obsolete, or make ASP.NET MVC the One Tool to Rule Them Allâ„¢.

This is why carpenters and other craftsmen don't just have one type of hammer. They have several different types, each optimized for a particular type of hammering.


To help you decide which to use, listen to this Hanselman podcast:

This is not your father's WCF - All about the WebAPI with Glenn Block

How does WCF fit into a world of Web 2.0 lightweight APIs? What's the WCF WebAPI and how does compare to services in ASP.NET MVC?

I haven't personally looked at it yet, but it wouldn't surprise me if the Web API you refer to in ASP.NET MVC 4, and the new WebAPI in WCF, turn out to be the same thing. Phil Haack is probably using WCF to implement WebAPI internally in ASP.NET MVC 4, or they both resolve to the same internal mechanism.

See Also
http://wcf.codeplex.com/wikipage?title=WCF%20HTTP