Bruce Tate on Ruby and REST
Gernot Starke points to this article by Bruce Tate. Nice try, unfortunately including some misleading statements:
Rather than inventing an exhaustive list of standards, REST uses existing Internet standards, including HTTP, XML, and TCP/IP.
Maybe true for a RESTful application, but not for REST itself.
REST clients use the same HTTP commands as your browser to access resources.
Except for PUT and DELETE.
The HTTP commands map to CRUD like this:
- Create: HTTP put
- Read: HTTP get
- Update: HTTP post
- Delete: HTTP delete
The analogy isn’t very good, anyway, but if it’s used, PUT should map to update and POST to create.
But anyway, not bad, and good to see REST get most exposure.
Categories
Ruby and RoR , SOA, Web Services and REST2 TrackBacks
Listed below are links to blogs that reference this entry: Bruce Tate on Ruby and REST.
TrackBack URL for this entry: http://www.innoq.com/mt4/mt-tb.cgi/1760
As Stefan says it does seem that a number of people still like to think of REST in terms of CRUD. Here's my 2p worth: GET safely retrieves copy of a thing identified by the URI. Let's call that READ. PUT - sends a complete copy of the thing. So that c... Read More

I just want to point out that there seems to be no consensus whether PUT or POST should be used for creating resources. After reading the HTTP 1.1 RFC I came to the conclusion that POST is for updating and PUT for creating new resources.
I disagree. The spec says “The PUT method requests that the enclosed entity be stored under the supplied Request-URI. “, which means that you need a URI to store something (and will later be able to retrieve its representation from the same URI). To me, this implies an update.
A POST often creates a new subordinate resource, such as a new item in a forum thread, and returns a new URI; but it can also do almost anything else that is not “safe” and/or “idempotent”. As I said, the analogy isn’t very good.