Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When to use the MVC4 Web-API vs a traditional HTTP web-service?

I noticed when the MVC4 beta was announced, it includes a new "Web-API". (MVC 4 announcement)

In what circumstances should I use this Web-API instead of a normal HTTP/WCF Web-service? What problem is it trying to solve?

like image 420
NathanS Avatar asked Feb 24 '12 07:02

NathanS


1 Answers

The Web API allows you to very easily expose an API of some existing web site (or build a new one) using standard RESTful techniques. Achieving the same goal with WCF would be a little more challenging but could be done. Scott Gu wrote a nice overview of the Web API.

like image 184
Darin Dimitrov Avatar answered Oct 20 '22 15:10

Darin Dimitrov