4422Re: [rest-discuss] Re-using information fields for queries in REST
- Jun 1 4:54 PM
"David Orchard" wrote:
-----Original Message----- From: Walden Mathews [mailto:walden@...] That looks more like a collection or subset to me. A single artist resource might be more like /Artist/123. An important question is: how does the client discover that URI? The "hyptertext engine" constraint of REST really wants it to be discovered, not fabricated by client as a parameter list.
Why is discovery of a particular URI "better" than discovery of the construction technique for a URI? This argues that HTML FORM GETs are a bad way of creating URIs because they are fabricated.
Suppose you want to reference artists on another site that uses an entirely different URI format. Are you going to reverse-engineer those URIs and add yet more semantics to the query response format for those URIs?
Also, there's a propensity for humans to see patterns in structures. URIs are often such a structure. I agree that a person seeing /artist/123 may be inclined to try artist/124. However, I think people are more inclined to see /artist?id=123 and try /artist?id=124. The moment you tell people that there is a pattern, they expect the pattern. You can't stop people from seeing patterns where there may not be any, but you can certainly stop from telling people there is a pattern where you know there is not one.
- << Previous post in topic Next post in topic >>