ASP.NET Web API-1

Introduction

We all are know that WCF is best for Service oriented programming and it supports high level protocols, security. This article explains the when should we use Web API instead of WCF service.

Getting Started

Before starting how to work with Web API, I would like to describe the situations that will help developers to choose Web API for service-oriented applications. There are many cases that will force developers to use Web API instead of WCF service.

First Case, 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. It means in practical developers should use Web API when to let’s say there is a function that contains some business logic and data process, that function is used by both web client and mobile client.

When your service-oriented programming does not require high-level protocol rather than only HTTP protocol, because Web API supports only HTTP protocol, and application requires only limited media types like TEXT, JSON, XML, etc.

ASP.NET Web API should be used if you are creating and designing new REST-style services. Although WCF provides some support for writing REST-style services, the support for REST in ASP.NET Web API is more complete and all future REST feature improvements will be made in ASP.NET Web API.

When you want to create a resource-oriented service over HTTP that can use the full features of HTTP (like URIs, request/response headers, caching, versioning, various content formats and when you want to expose your service to a broad range of clients including browsers, mobiles, iPhone and tablets.

Use ASP.NET Web API when high-level security like Message Security and multiple message pattern does not require because HTTP is request/response but additional patterns can be supported through SignalR and WebSockets integration.

Related Articles

  1. Difference Between DataContractSerializer and XMLSerializer
  2. Getting Client's IP Address in WCF Service
  3. Consuming Restful API with Bearer Token Authentication using HttpWebRequest
  4. Concurrency Mode In WCF
  5. Difference between WCF And Web Service

Summary

In this article we have discussed the situations to use ASP.ENT Web API, The next part of the article I am going to demonstrates how to create Web API. Hope this artcile may helpful to you.

Thanks

Kailash Chandra Behera

An IT professional with over 13 years of experience in the full software development life cycle for Windows, services, and web-based applications using Microsoft .NET technologies. Demonstrated expertise in delivering all phases of project development—from initiation to closure—while aligning with business objectives to drive process improvements, competitive advantage, and measurable bottom-line gains. Proven ability to work independently and manage multiple projects successfully. Committed to the efficient and effective development of projects in fast-paced, deadline-driven environments. Skills: Proficient in designing and developing applications using various Microsoft technologies. Total IT Experience: 13+ years

Previous Post Next Post

نموذج الاتصال