Tuesday, 24 March 2015

What is a Web API: Why and how it is used

A web API can be defined as a Restful framework for building http services. What do we mean by Restful? It is an architectural style that abstracts the architectural elements within a distributed system. It needs to be remembered that Web API is not exactly a replacement for WCF (Windows communication foundation) and must be used only if you are working with http. In short, it is an API for both the web browser and web server.



The Asp .net web API is a framework for building HTTP services that can be used by a wide range of clients including mobiles, iphone, browsers, and tablets. As a web API, it has minimal friction and provides multiple hosting options. Your job is also simplified by the fact that it does not need multiple protocols.

Though not a part of the MVC Framework, it is very similar to ASP.NET MVC since it contains the MVC features such as routing, controllers, action results, filter, model binders and IOC container. It does form a part of the core ASP.NET platform and can be used with MVC and other types of Web applications like Asp.Net WebForms. It can also be used as n stand-alone Web services application.

Advantages of Web API
  • It’s opensource
  • If your requirement is a web service(and not SOAP), then look no further than ASP .NET
  • No laborious configuration requirements, like defining extra configuration settings for different devices that are found in WCF
  • Simple creation of service when contrasted with WCF which is used primarily to deploy a service oriented architecture(SOA) to support distributed computing.
With other impressive features such as support for OData MVC feature support and dependency injection that make it a robust, efficient and ideal choice for building http services. Firms like Openwave already provide extensive services in the domain of .Net web applications furthering the reach of APIs.


No comments:

Post a Comment