WebAPIsMVC.md - brainchildservices/curriculum GitHub Wiki
SLIDE-1
-
ASP.NET WEB API
- ASP.NET makes it easy to build services that reach a broad range of clients, including browsers and mobile devices.
- Asp.Net Web API is used to create full-blown HTTP services with an easy and simple way that returns only data, not view.
- Web API helps to build REST-ful services over the .NET Framework and it also supports content-negotiation(it's about deciding the best response format data that could be acceptable by the client. it could be JSON, XML, ATOM or other formatted data), self-hosting.
- Web API also takes care of returning data in particular format like JSON, XML or any other based upon the Accept header in the request and you don't worry about that.
- In Web API the request is mapped to the actions based on HTTP verbs.
- Asp.Net Web API is a new framework and part of the core ASP.NET framework. The model binding, filters, routing, and other MVC features exist in Web API are different from MVC and exists in the new System.Web.Http assembly. In MVC, these features exist within.System.Web.Mvc Hence Web API can also be used with Asp.Net and as a stand-alone service layer.
SLIDE-2
-
What is WEB API
- The ASP.NET Web API is an extensible framework for building HTTP based services that can be accessed in different applications on different platforms such as web, windows, mobile etc.
- ASP.NET Web API is a framework for building HTTP services that can be consumed by a broad range of clients including browsers, mobiles, iphone and tablets.
- ASP.NET Web API is an extension of WCF REST API. In short, it is a replacement of WCF REST API. It can be used with ASP.NET MVC and other types of Web applications like ASP.NET WebForms. Also, Web API can be used as a stand-alone Web services application.
SLIDE-3
-
Why ASP.NET Web API (Web API)?
- 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.
- 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.
SLIDE-4
-
When to choose ASP.NET Web API?
- Choose Web API if you are using .NET framework 4.0 or above.
- Choose Web API if you want to build a service that supports only HTTP protocol.
- Choose Web API to build RESTful HTTP based services.
- Choose Web API if you are familiar with ASP.NET MVC.
SLIDE-5
-
Create WEB API project
-
REF Link: https://www.dotnettricks.com/learn/webapi/what-is-web-api-and-why-to-use-it