Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are advantages of RESTful WCF service over normal WCF service

Tags:

wcf

I am new in WCF technology, I want to know what are the differences between RESTful WCF service and normal WCF services. What are the advantages of RESTful service over normal WCF service ?

Thanks.

like image 624
Upendra Chaudhari Avatar asked Oct 20 '11 07:10

Upendra Chaudhari


2 Answers

REST service is based on HTTP protocol. Each method invocation is a http get,post,delete or put request. Since it is HTTP protocol based so anything that can talk http can consume your service without much effort i.e. javascript, C#, Java, Whatever.

Also REST call results can be cached like normal http pages (by intermediate proxies or client machine) if you send the right caching parameters with the response.

It is firewall friendly and it is fairly simple and straight forward.

However it is also more oriented towards 'resources' while normal WCF service is oriented towards RPC style communication.

Normal WCF supports callbacks and whole lot of other things that REST doesn't support but obviously it comes with cost of platform compatibility and complexity.

like image 187
Muhammad Hasan Khan Avatar answered Sep 21 '22 18:09

Muhammad Hasan Khan


A service that uses the architectural style of REST is generally referred to as a RESTful service or endpoint.

REST offers some significant features and benefits over RPC technologies in many cases. Second, Microsoft is moving many of its own implementations away from RPC technologies (such as SOAP) and toward REST.It has features like Caching,Scale-Out,Side Effects,Idempotent,Interoperability,Simplicity

WCF is the Microsoft framework for building applications that communicate over a network, regardless of the style or protocol. The concept behind WCF was to create a framework that was extensible and pluggable so that developers could learn one programming and configuration model and be able to apply those skills to many different kinds of distributed systems.

like image 35
Chief Avatar answered Sep 20 '22 18:09

Chief