Sunday, February 1, 2009

I see many of services mentioning about REST or RESTful Services so i decided to dig further on this standard.
Here is compilation of what i have learned.
REST stands for representational state transfer. With a large number of IT giants adapting this REST, it is being projected as an alternative to SOAP toolkit methods. REST consider each URL on internet as a resource or object. One can use HTTP GET to fetch contents of objects and use POST, PUT, or DELETE to modify/delete the object.
We will see further in the document what does that mean?

Some of the companies like Yahoo, Amazon, Flickr, twitter etc have provided their API conforming with SOAP as well as RESTful format. However SOAP is still widely used format with grace of Google. Here i list some of the advantages and disadvantages for SOAP and RESTful resources.

REST:
Easy to build as no toolkits are required.
Human readable results.
Light weight as less XML stuff here.
Server side efforts required. One need to handle serialization of XML data.

SOAP
Development tools available.
Rigid, type checking
Easy to work with sometimes.
Client side efforts required as server side efforts, serialization de-serialization issues are handled by SOAP libraries only. Regualar HTTP based API exporting requires a hell lot of efforts. HTTP based API requires additional work of mapping URI paths to specific handler.

All information you gain should be intended to solve some problem. So without wasting time, i'll first explain the practical way of using REST as opposed to RPC.

Reference:
http://www.petefreitag.com/item/431.cfm
http://en.wikipedia.org/wiki/Representational_State_Transfer
http://effbot.org/zone/rest-vs-rpc.htm
http://bhavin.directi.com/http-vs-rest-vs-soap/

No comments:

Post a Comment