On 29/11/06, Stefan Tilkov <[EMAIL PROTECTED]> wrote: > 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.
So which bit of REST was I actually not understanding? If I have something like http://www.bollocks.com/invoice?customer=fred&date=1/1/01&orderId=4 or http://www.bollocks.com/invoice?customer=fred&startDate=1/1/01&endDate=1/1/06&reportType=Summary Then is this valid REST, and if not why not, and if so why isn't this just a parameterised request as I said earlier? If it is valid rest then to me this is two clearly different operations that are being invoked. Or should each report type have a separate identity, even though they are all clearly related to the same resource (invoice). > > 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. Yes it does, but then I was brought up on Ada where I learnt that names actually do matter and that using poor names was a bad thing(tm). I can't see how alskdjalkjd1928e1928e can be RESTful in that it doesn't describe a clearly identifiable resource. > > Stefan > -- > Stefan Tilkov, http://www.innoq.com/blog/st/ > > > > >
