News for hackers. Stuff that matters.
Re:REST, I just don't get it by paul on Friday August 15, 2008 @02:38AM (#276819)
Nearly all of them? Run your packet sniffer on Gmail for example -- I guarantee that send isn't implemented with a PUT to noun url!
Re:REST, I just don't get it by gunderson on Friday August 15, 2008 @02:42AM (#276823)
And your point?
Re:REST, I just don't get it by paul on Friday August 15, 2008 @02:49AM (#276830)
He asked for an example of a web service that doesn't follow the RESTful model. I replied to his request. My point is that almost no web service is truly "RESTful".
Re:REST, I just don't get it by gaika on Friday August 15, 2008 @03:21AM (#276841)
Sorry, but I asked about a service that doesn't FIT the RESTful model.
Re:REST, I just don't get it by paul on Friday August 15, 2008 @03:26AM (#276843)
Well, I guess it depends how you define "FIT". It's possible to shoehorn just about any service into just about any model, but that doesn't make it a good idea. For example, sending email by doing a PUT to some newly created URL is silly. There's a reason that the english language has more than 5 verbs.
Re:REST, I just don't get it by gaika on Friday August 15, 2008 @03:45AM (#276854)
Right, closer analogy would be object oriented programming, where some methods are standard (constructor->post, destructor->delete, copy->get, assignment->put) and some are totally type specific. The point of REST is that these type specific methods do not have to pollute your core / transport and can happily reside in your client libraries.

Sending email is best mapped to POST (create), not PUT (update), and the URL doesn't change for POST.

Re:REST, I just don't get it by paul on Friday August 15, 2008 @05:39AM (#276890)
I think perhaps we're talking about a different aspect of REST.

What I find annoying is people objecting to "POST /actions/subscribe" (with the params in the post body) because it's "non-RESTful" -- the url is a verb and REST demands a noun.

Re:REST, I just don't get it by bct on Friday August 15, 2008 @12:55PM (#277124)
REST doesn't demand a noun. If they all have the same code backing them, there's no functional difference between:

    POST /actions/subscribe
and

    POST /subscriptions
and

    POST /abcdef1234567890
The shape of a URL has nothing to do with REST. However, if a lot of your URLs contain verbs it suggests that you aren't doing REST. It's a design odor.
Re:REST, I just don't get it by gaika on Friday August 15, 2008 @10:53AM (#277014)
What's wrong with creating a subscription object and letting people manipulate it the usual REST way via /subscription/<id>?

That way you can list your subscriptions, modify, delete in a very consistent way, without a need for "POST /actions/modify_subscription" and such.