1.

What is ASP.NET Web API and what are its advantages?

Answer»

ASP.NET Web API is a framework provided by the Microsoft open source technology for building and consuming HTTP based services on top of .NET Framework. The advantage of Web API is that it can be consumed by a broader range of clients including web browser and mobile applications, IoT etc. ASP.NET Web API provides an ideal platform for building RESTful applications on the .NET Framework. So there will be a client server communication using HTTP protocol.

HTTP (Hypertext Transfer Protocol) is an application level protocol that is USED to deliver data such as html files, IMAGE files, query results, etc. on the World Wide Web. HTTP is a stateless protocol, meaning that after one cycle of request and response the server forgets everything about the cycle, and it considers another request from the same client as a new request from a new client.

Below is a simple Client-Server architecture of HTTP protocol

Using ASP.NET Web API, we can create non-SOAP based services like plain XML or JSON strings, etc. with many other ADVANTAGES including: 

  • ASP.NET framework SHIPS out with the .NET framework and is Open Source  
  • Create resource-oriented services using the full features of HTTP. 
  • Web API is a lightweight architecture and is good for the devices which have limited bandwidth 
  • We can expose services to a variety of clients easily like browsers or mobile devices, etc. 
  • Web API increases TDD (Test Data Driven) approach in the development of RESTful services. 



Discussion

No Comment Found