What is the difference among WCF, WCF RESTful and Web API? [Resolved]

Posted by Kumarkrishna184 under ASP.NET MVC on 12/18/2015 | Points: 10 | Views : 622 | Status : [Member] | Replies : 3
What is difference among WCF and WCF RESTful and Web API more concetrating on his protocal (http,tcp) and endpoint configuration? I have a doubt, please clear my doubt.

Thanks and Regards,
Krishna Kumar



Responses

Posted by: Sheonarayan on: 12/18/2015 [Administrator] HonoraryPlatinum | Points: 50

Up
0
Down

Resolved
WCF

1. The main benefits of WCF is the protocol support, it supports many protocols like TCP, MSMQ, HTTP etc.
2. The configuration of WCF is complex in comparison with others two
3. It proprietary to Microsoft however can be consumed by any other kind of applications as it supports different types of protocols
4. Different flavor of hosting available, iis, application or self hosting
5. Mainly data is returned in XML format

WCF Rest

1. It is similar to WCF however more towards exposing data over HTTP protocols only.
2. It supports GET and POST method of posting data.
3. It supports XML and JSON both.

Web API

1. The simplest in above all. No special configuration required in either client or server side.
2. Open source and can be consumed and exposed by anyone. The best solution to create RESTful services.
3. Supports all features of HTTP (caching, headers modifications etc.)
4. ASP.NET version of Web API structure is near to ASP.NET MVC so all the benefits of ASP.NET MVC is applicable to this (like TDD, DI, Unit testing etc.)
5. Simply can be hosted on IIS, no special configuration is required.
6. It supports both JSON and XML. JSON is the preferred format of data communication

In scenario of service based architecture, ASP.NET Web API is the way to go.

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Kumarkrishna184, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajeshatkiit on: 12/19/2015 [Member] Starter | Points: 50

Up
0
Down

Resolved
http://www.dotnet-tricks.com/Tutorial/webapi/JI2X050413-Difference-between-WCF-and-Web-API-and-WCF-REST-and-Web-Service.html/

http://www.c-sharpcorner.com/UploadFile/2b481f/difference-between-Asp-Net-web-api-and-wcf/

Kumarkrishna184, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kumarkrishna184 on: 12/18/2015 [Member] Starter | Points: 25

Up
0
Down
Sir, If there is requirement to use tcp protocal then how can we use web api? As i know web api is performed on only http? Have only one way of hosting i.e. IIS with web api?

Thanks and Regards,
Krishna Kumar

Kumarkrishna184, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response