开发者

What is an example of a website/service which _isn't_ REST?

开发者 https://www.devze.com 2022-12-22 18:13 出处:网络
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 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 stor开发者_如何学Goes state information locally (which the server does not know about), that service is NOT rest.

Thanks in advance.


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:

  • Wikipedia REST Article
  • Wikipedia SOAP Article


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号