REST what is it?

Subscribe to REST what is it? 2 posts, 2 voices

 
Zamt 6 posts

A bunch of us were talking at the meeting last night about REST and what it is and isn’t….

I found this quick and easy explanation…. didn’t require a whole lot of reading and got right to the point:

http://www.megginson.com/blogs/quoderat/2007/02…

 
Al Gordon 52 posts

This is a pretty good resource. However, I think I disagree with something, right off the bat.

Use HTTP POST to update information

Actually, I believe it’s supposed to be something along the lines of: use POST to create information, GET to read it, PUT to update it, and DELETE to destroy it. I’m basing this on the Method Information section of the RESTful Web Services book by O’Reilly (pp. 9-11), as well as the REST implementation which is provided by default now in Ruby on Rails.

Of course, Wikipedia’s REST page (http://en.wikipedia.org/wiki/Representational_S…) lists a table that maps HTTP methods against CRUD operations allowing POST to do everything other than a Read, and to be fair, since web browsers pretty much don’t implement anything other than GET and POST, most implementations of REST that exist “in the wild” (including the Rails one I just mentioned) basically simulate PUTs and DELETEs via POSTs.

I also think I heard someone say something like “REST really isn’t anything”, or something along those lines. (I may have misheard—I’m old and have bad hearing.) REST actually is something, but there’s not a lot to it, specification-wise. I believe, however, that in the case of REST, a little bit goes a long way. In the case of the BUG, for example, it provides convention, such that if you understand how to pull coordinates from the GPS module (an HTTP GET operation against a URI such as http://mybug/services/Location), you should pretty much intuitively know that pulling a picture from the camera module is as simple as referencing its service (in this base, ‘Picture’) via a URI such as http://mybug/services/Picture.

copyright © 2007 scosug - all rights reserved