Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

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

share|improve this answer
    
Indeed, ASP.NET Web API is the new name of WCF Web API. It's been renamed for its inclusion with the ASP.NET MVC 4 Beta. –  Eric King Feb 16 '12 at 19:50
1  
I don't think Phil is working at Microsoft any more, and I don't think he was on the team that implemented WebAPI. That said, he may have been involved with exposing WCF over ASP.NET/MVC prior to leaving. Also +1 for the link to the Hanselminutes podcast regarding the subject. –  Kyle Hodgson Feb 16 '12 at 20:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.