Just a comment on this behavior by Rails ... I don't have the relevant
citations immediately at hand, but I have seen comments by DHH and others
that describe this long-standing design feature as pragmatic.  I think one
of the key drivers was that the PUT verb has historically been very
inconvenient to use by many clients, including simple Web forms.

The vocabulary of HTTP 1.1 is actually quite rich, but many frameworks elide
all but the basics, which mean that many REST designs are more spartan than
they have to be.  Using POST because PUT is simply unavailable is something
I have seen and even been forced to do myself many times.

One of the things I like about using Restlet both as a client and a server
is that it gives me nicely abstracted access to the entire conceptual
framework of HTTP.

- Rob

On Tue, Dec 22, 2009 at 10:18 AM, Conor Moran <[email protected]>wrote:

> I found an interview with Jerome on infoQ recently which states it is best
> to use PUT for both Create & Update
>
> ------- http://www.infoq.com/articles/restlet-louvel-interview -------
> InfoQ: Can you elaborate a little on your criticism of Rails in this
> regard? What's unnatural about its CRUD mapping in your opinion?
>
> JL: Beside the GET and DELETE HTTP methods that map nicely to SQL SELECT
> and DELETE verbs, I find the usage by Rails of POST method for creation
> rather unfortunate. The best method for creation in REST is PUT which is
> also used for updates. The advantage of PUT over POST is that if the
> operation fails it can be safely repeated which isn't the case for POST.
>
> Also, ...
> -------
>
> Should I ever use POST?
> If so, can you give an example of what to use this for?
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2432335
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2432348

Reply via email to