Re:REST, I just don't get it
by jamesbritt on Saturday August 16, 2008 @12:23PM
(#277783)
"REST seems to work well for most web applications because they are typically document-oriented. "
Can you (or anyone) give examples of things on the Web that are not concerned with the transfer and manipulation of resources?
"As Paul and many others point out, the web has gotten along fine with just the POST and GET verbs; but a good web application is built upon sensible and addressable URLs."
URLs do not have to map to the underlying architecture of a site. They are orthogonal if you provide a routing layer, something pretty common and easy to manage in most modern Web frameworks.
REST seems to work well for most web applications because they are typically document-oriented. Sites like Youtube, Flickr, Wikipedia, Gmail, Amazon, etc. are dealing with some form of hypermedia documents. It only makes sense to apply CRUD design concepts to documents.
Unfortunately a lot of people have taken REST design concepts too far and try to apply it to everything, which simply won't work. But does this surprise anybody? Its pretty damn hard to saw a 2x4 in half with a hammer.
From a "religious" point-of-view; I do find RESTful websites easier to test & diagnose since problems (application state) can typically be isolated to specific URLs. You gotta love it when you can refer to curl as "the truth"!
As Paul and many others point out, the web has gotten along fine with just the POST and GET verbs; but a good web application is built upon sensible and addressable URLs.