On Sun, May 4, 2008 at 1:52 AM, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: > On Sun, May 4, 2008 at 7:05 AM, J. Shirley <[EMAIL PROTECTED]> wrote: > >> > On a side note about REST - REST doesn't mean human readable URLs. It > > means representative URLs. The bit about cd/id/{CDID}/ smells like > > named parameters going into positional parameters. What is the real > > difference between cd?id={CDID}&action=delete, aside from different > > characters? Where as with REST, /cd/{id} is a unique identifier for > > that object and hence a full representation. > > The problem I see with /cd/{id} is that when you have a primary key > that is 'create' - this would clash with the 'create' action. > /cd/id/{id} let's you separate the reserved words from the user data. > >
A pet peeve of mine is that people seem to have this weird idea that primary key == id. An id can just be some human readable mechanism to looking up the item, where as the primary key is what is actually used by the database to determine the relations. They do not have to be the same field but often times they are out of convenience. In cases like this, they simply shouldn't be though. _______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/