Wednesday, 4 February 2015

Difference between WebServices, WCF, WCF REST, Web API

Web Services

  1. Web services are soap based  and return data in xml format.
  2. It supports http protocols only.
  3. Web services can be consumed by any client that understand xml but it not open source.
  4. Web services can be hosted on IIS only.

 WCF
  1. WCF services are also soap based and return data in xml format.
  2. WCF supports various protocols like TCP, HTTP, HTTPS, Named Pipes,MSMQ.
  3. WCF services can be consumed by any client that understand xml but it not open source.
  4. WCF services can be hosted on the IIS, within the application or by using window service.

WCF REST
  1. We have to enable webHttpBindings for WCF Rest service.
  2. It supports HTTP GET and HTTP POST verbs by [WebGet] and [WebInvoke] attributes.
  3. We have to do some configuration in IIS to enable these HTTP verbs to request for that particular verb in the .svc file.
  4. The URI template must be specifies for passing data through parameters using a WebGet.
  5. It Supports XML,JSON and ATOM data format.

 Web API
  1. Web API is a easy and simple way for building HTTP services.
  2. Web API  is an open source to build rest ful services over the Dot net framework.
  3. Web API uses full features of HTTP like URI, request /response header, caching ,versioning, various content formats etc.
  4. Web API can be hosted on the IIS or within the application.
  5. Web API is a light weight architecture and very good for the smart phones in the low bandwidth also.
  6. Response send by the Web API can be formatted by the MediaTypeFormatter into JSON,XML or any format we want to add as mediaTypeFormatter.

 

 

No comments:

Post a Comment