On Nov 28, 2006, at 11:40 PM, Steve Jones wrote:

So you are saying that it is _bad_ practice in REST to have sensibly
named URIs? I'm really missing which bit of REST I've violated by
having a sensibly named URI, and which bit of the "web" doesn't use
URIs to split different areas of functionality (ala the google
example).


No, it's of course not bad practice. It's just very tempting to start adding meaning to URIs that doesn't belong there - like for example an "action". In HTTP, a URI identifies a resource, and *every* resource supports the same methods (or a subset thereof): GET, PUT, POST, DELETE. This means that instead of coming up with a set of N services that expose some unspecified number of operations, you have to come up with M resources that support 4 operations when you follow REST conventions.

See here for an attempt at a graphical explanation: http:// www.innoq.com/blog/st/2006/06/30/rest_vs_soap_oh_no_not_again.html

The HTTP verbs have defined semantics, and as long as your design doesn't violate them, it doesn't matter whether your URIs are of the http://.../draw?x=5&y=4 or the http://.../alskdjalkjd1928e1928e variety.

Stefan
--
Stefan Tilkov, http://www.innoq.com/blog/st/


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to