Reputation: 51
I want to understand the WCF and REST API implementation. As per internet information, REST concept was introduced by Roy Fielding in year 2000 and WFC was incorporated in .Net framework on 2006. If REST concept was best then Why Microsoft introduced WCF and now REST API became popular.SOAP is now largely obsolete. Really appreciate if anyone can provide insights on this.
Upvotes: 4
Views: 3775
Reputation: 2135
There are a number of technologies that can help you develop HTTP Web Services like Web Service, WCF and WEB API.
Rest on the other hand is not a technology but an architectural style for creating Web Services so every service that follows a REST Architecture is called RESTful web services/API
read REST constraints here: Rest Constraints
The main differences between WCF and WEB API are:
WCF is SOAP-based and return data in XML, It requires more configuration, It supports more web protocols like HTTP, TCP, UDP, custom etc, is not open source, supports duplex message exchange patterns etc
Web API is REST-based framework for building HTTP Services, more suitable for connecting through any device, much less configuration, supports fewer protocols, supports request-response protocol [means every request should contain enough information for the response but it can be modified using Signal R and Web Sockets etc], is open source
Upvotes: 1