Introduction

Service technology is a new trend in the World Wide Web, where Microsoft provides the modularity to use and easy to make the service with the .NET framework. Some years ago, when we were using the service with XML as a web Service (.ASMX) in 2002 and then Microsoft added the broadly capable Windows Communication Foundation (WCF) a few years later.

Microsoft gave .NET developers many options for building SOAP-Based services. With some basic configuration changes, we could support a wide array of communication protocols, authentication schema, message format, as the WCF standard. In short, now a days the demand for mobile-to--service communication and browser-based, single-page applications have evolved in the market rapidly. It was no longer enterprise services talking SOAP/RPC to each other. These application needed a simple HTTP-only, JSON-compitable back end. The internet needs of these applications look like a connected version, REST.

The ASP.NET Web API is a powerful framework for building HTTP-only, JSON-by-default web service without all the fuss (no setting of endpoints, neither setting of contracts) of WCF. Model binding works out-of-the-box and returns the plain-old CLR Objects. From these frameworks we can make RESTful services in a few minutes.

Advantages of Web API

AdvantageOfWebAPi

Features of the ASP.NET Web API

FeaturesOfWebApi

Summary

In this article, we learned how the ASP.NET Web API provides a great platform for building REST-style Web APIs. Where much of the power and flexibility of WCF and SOAP aren't needed, Web API can be a very simple and elegant alternative. Where applications that need to support only HTTP communication, as well as those that focus heavily on text-formatted messages.

Go to next part>>