On Tue, 2009-07-28 at 09:56 +0200, Masklinn wrote: > No. There's nothing RESTful about URLs. In fact, at the end of the > day, URLs are pretty much irrelevant to the "RESTfulness" of a service > or system.
Somebody needs a coffee :) URLs are very relevant to RESTfull services over the web, as resources in such a service have to have a URI. Not only that, but as you encode more state in the request, your backend becomes more stateless ... I've seen countless of web applications where the resource the page was referring to was passed in the session. Being more stateless is another restfull trait. Having beautiful URLs also helps with the discoverability of your API. That's another restfull thing to do. The example I gave was a bad one regarding best practices ... when changing state on the server, you should at least POST. And since browser don't know how to send "PUT" or "DELETE" requests, it's perfectly acceptable to encode that action in the URL. And I'd like to think that we prefer pragmatism over dogma. Labeling things with "this is REST" and "this is not" because it says so in "the book" really doesn't help anyone. -- Alexandru Nedelcu --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---