I know what a Web API is.
I've written API's in multiple languages (including in MVC3).
I'm also well practiced in ASP.Net.
I just discovered that MVC4 has "Web API" and without going through the video examples I can't find a good explanation of what exactly it IS.
From my past experience, Microsoft technologies (especially ASP.Net) have a tendency to take a simple concept and wrap it in a bunch of useless overhead that is meant to make everything "easier".
Can someone please explain to me what Web API in MVC4 is exactly? Why do I need it? Why can't I just write my own API?
I know what a Web API is.
ASP.NET Web API is a "non-opinionated" framework to build HTTP Service regardless of REST or RPC. It is Microsoft's best implementation of RFC 2616 (HTTP Spec).
Certainly you can build your own API but ASP.NET Web API:
- Built based on the Russian Doll model which allows for lego-like modules to be added to the HTTP pipeline
- Makes HTTP first class citizen so all common headers are strongly typed (not just name value) and helps with parsing them
- Allows for both ASP.NET (IIS) hosting or self-hosting
- supports content negotiation, media types, ...
- Is Async from top to bottom
- Uses a similar approach for clients with HttpClient
In short: ASP.NET Web API is making REST a first class citizen in .NET, which WCF was not really able to embrace. As you may know, ASP.NET Web API is a framework
for building web APIs on top of the .NET Framework.
One of the biggest frustration we had as web developers was to face with the endless configurations with WCF. I mean, WCF is great but hasn’t been embraced the REST since the WCF Web API framework . There was something called REST Starter Kit but it ended up dead.
However, ASP.NET Web API is a next generation framework that makes it easy to build HTTP services that reach a broad range of clients, such as browsers and mobile devices. It is an ideal platform for building RESTful applications on the .NET Framework. For more information and great blog posts, visit ASP.NET Web API bloggers page
ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices.
ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.
Specifically, ASP.NET Web API includes:
Today, a web-based application is not enough to reach it's customers. People are very smart, they are using iphone, mobile, tablets etc. devices in its daily life. These devices also have a lot of apps for making the life easy. Actually, we are moving from the web towards apps world. So, if you like to expose your service data to the browsers and as well as all these modern devices apps in fast and simple way, you should have an API which is compatible with browsers and all these devices.
protected by gnat Jul 17 '15 at 6:54
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?