views:

109

answers:

3

So I just started digging into web tech, and I'm stuck on the concept of REST. Could someone clarify REST by giving me an example of what isn't rest?

So, as far as I can tell, REST requires the server and client to both be in the same state at the end of every request-response HTTP transfer. Does that sound right?

My understanding is that, if a client stores state information locally (which the server does not know about), that service is NOT rest.

Thanks in advance.

+2  A: 

For web services, SOAP is an example of something that is not REST because the implementer of the service creates it's own verbs via methods, rather than the standard GET, POST, etc. This article explains it somewhat:

Turnkey
Appreciate the concise answer.
montooner
Note though, that the Wikipedia example on REST is non-authoritative and gets significant bits not quite right!
Jan Algermissen
Thanks, that sounds like an opportunity for improvement that you can make as it is a community-driven site like this one.
Turnkey
+1  A: 

This classification of APIs might help: http://nordsc.com/ext/classification_of_http_based_apis.html there are also examples in the right hand column.

REST is an architectural style for networked systems. REST defines several constraints on the various architectural elements (connectors, components, data). If a system adheres to these constraints REST guarantees the system to have certain properties (e.g. scalability, fragmented evolvability).

Any system that does not adhere to the constraints is not RESTful and is not guaranteed to have these properties. E.g if application state is stored on the server (aka session state) then scalability is negatively impacted.

You probably need to do more digging (e.g. read the rest-discuss archives and the dissertation). http://tech.groups.yahoo.com/group/rest-discuss/

http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm

HTH, Jan

Jan Algermissen
A: 

Restful Web Services is a good book to read to get what REST is about.

Paul D. Waite