Thursday, November 16, 2006

What is a RESTful Web Service ?

I have to admit that I am very confused about the term "RESTful Web Services". REST is one of the most highly missunderstood concepts out there and certainly one the most highly abused terms. For most REST means POX/HTTP GET or POST, simillar to some folks, who think they are doing "Web Services" simply bcos they are using SOAP, WSDL etc while there is utter disregard to loose coupling, service orientation ..etc.



I also see the endless debates on SOAP vs REST. I guess this stems from the fact that most think, REST is POX/HTTP GET or POST. While SOAP is a message format, REST is an architectural style. So there is absolutely no point in comparing apples to oranges.



So what is a RESTful Web Service ?

I have been talking to Roy Fielding on email trying to understand REST and have also been bugging Sanjiva on IM trying to clarify the facts. REST takes a "resource oriented approach" while Web Services (SOA) takes a "service oriented approach". One can argue that a service is a resource (from a REST POV) and a resource can be exposed as a service (from a WS POV). But there are some fundamental differences in these approaches. IMHO a service should be a more coarse grained concept than a resource. A service may encompass one or more resources. I assume what RESTful services means, is that the respective Web Service obeys the REST principles. How possible is that ? To me this is still a grey area and I will continue to ask this question until I understand this properly.

No comments: