On Mon, Dec 28, 2009 at 7:35 AM, Rob Heittman <rob.heitt...@solertium.com> wrote: > I agree. I think that when the discussion starts to turn around which HTTP > verbs map best to the idiosyncracies of relational databases (like safe > transactional ID assignment for rows) it is a hint to try mapping REST onto > the application at a higher abstraction level. REST styles often work more > naturally for high level object constructs, which also tend to have > corresponding real-world unique identifiers. As the abstraction level gets > higher, I find it both improves the fit to representational concepts, and > raises the likelihood of having a way of deterministically arriving at URIs > specific to the real world problem domain. > The most successful and widely adopted REST APIs seem to me to use natural > semantic concepts, URIs included.
Well, "natural semantic concepts" is possibly not that common even in Rest space. In the "natural" world, there are many "URIs" for a particular "resource". In many (possibly most) cases they start with an 'anonymous' URI that we could call "self" and traverses "downwards" (i.e. no ../../../ ). "My Sister" equals someone else's "My Friend Marie", and this "natural semantics" are in my experience fairly rare, albeit not that hard to accomplish with a graph oriented data store (Neo4j comes to *my* mind), and using base URIs embedded in the representation (being in a UUID form) and all other references relative and with resource-local identifiers (which also simplifies the earlier statement of assignment of URIs). > If the application just involves using Restlet as an implementation detail > of a private client/server system in a controlled environment, then I would > not fret too much about verb choice and other details as long as it makes > sense to the implementer and maintainers, and works well in practice. Otherwise, I think you formulate a conflated subject very well. In such controlled environment, it is also an open choice to extend the verb vocabulary if it makes sense. Cheers -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/2qq9er I work here; http://tinyurl.com/2ymelc I relax here; http://tinyurl.com/2cgsug ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2433250