Difference between Web API and WCF REST

Microsoft improving .NET framework day by day to support the wide range requirements of application. In this article we will learn about the some basic difference between Web API REST and WCF REST.
Let us demonstrate using following table

Web API REST
WCF REST
HTTP only. Suitable for access from various browsers, mobile devices etc enabling wide reach.

Support multiple transport protocols (HTTP, TCP, UDP, and custom transports) and allows switching between them.

Enables building Web APIs that support wide variety of media types including XML, JSON etc.

Support multiple encodings (Text, MTOM, and Binary) of the same message type and allows switching between them.

Uses basic protocol and formats such as HTTP, WebSockets, SSL, Equerry, JSON, and XML. There is no support for higher level protocols.

Supports building services with WS-* standards like Reliable Messaging, Transactions, Message Security.

HTTP is request/response, for additional need SignalR and WebSockets integration.

Supports Request-Reply, One Way, and Duplex message exchange patterns

Ships with .NET framework but is open-source

Ships with the .NET framework.

Note:
Please refer my previous article about Web API using following link
Summary
I hope this article is useful for all readers.In my next article we will learn about the Web API HTTP methods. If you have a suggestion then please contact me.

Post a Comment

www.CodeNirvana.in

Protected by Copyscape Online Copyright Protection
Copyright © Compile Mode