Wcf – What are advantages of RESTful WCF service over normal WCF service

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.

Best Answer

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.