7 msgConfiguration of $c->log with Catalyst::Log:...
8 msgInvalid session ids being generated
4 msgCatalyst / dbix-class / mysql / REST job
2 msgStrange UTF16 warning
1 msgWikipedia article improvement?
5 msgFastCGI: incomplete headers (0 bytes) received ...
5 msgBasic CRUD Tutorial
2 msgHow to display a single HTML::Widget form field...
7 msgLet's port Twitter to Perl
8 msgCatalyst, utf8 in form element type text
17 msgAnybody who fancies some LWP poking ...

RFC: Catalyst::Controller::REST::DBIC
\ luke saunders (4 May 2008)
. \ Patrick Donelan (4 May 2008)
. . \ J. Shirley (4 May 2008)
. . . \ Zbigniew Lukasiak (4 May 2008)
. . . . \ J. Shirley (4 May 2008)
. . . . . \ Zbigniew Lukasiak (4 May 2008)
. . . . . . \ Christopher Laco (4 May 2008)
. . . . . . . \ J. Shirley (4 May 2008)
. . . . . . . \ Steve Atkins (4 May 2008)
. . . . . . . . \ Christopher Laco (4 May 2008)
. . . . . . . . \ Matt S Trout (5 May 2008)
. . . . . . \ J. Shirley (4 May 2008)
. . . . . . . \ Zbigniew Lukasiak (4 May 2008)
. . . . . . . \ Matt S Trout (5 May 2008)
. . . . . . . . \ J. Shirley (5 May 2008)
. . . . . . . . . \ Andrew Rodland (5 May 2008)
. . . . . . . . . . \ J. Shirley (5 May 2008)
. . . . . . . . . . . \ Zbigniew Lukasiak (5 May 2008)
. . . . . . . . . . . . \ J. Shirley (5 May 2008)
. . . . . . . . . . . \ luke saunders (5 May 2008)
. . . . . . . . . . . . \ J. Shirley (5 May 2008)
. . . . . . . . . . . . . \ Peter Karman (5 May 2008)
. . . . . . . . . . . . . . \ J. Shirley (5 May 2008)
. . . . . . . . . . . . . . \ luke saunders (5 May 2008)
. . . . . . . . . . . . . . . \ Peter Karman (6 May 2008)
. . . . . . . . . . . . . \ luke saunders (5 May 2008)
. . . . . . . . . . . . . . \ J. Shirley (5 May 2008)
. . . . . . . . . . . . . . . \ Peter Karman (5 May 2008)
. . . . . . . . . . . . . . . \ luke saunders (5 May 2008)
. . . . . . . . . . . . . . . . \ Ashley (5 May 2008)
. . . . . . . . . . . . . . . . \ Zbigniew Lukasiak (6 May 2008)
. . . . . . . . . \ Matt S Trout (5 May 2008)
. . . . . . . . . . \ J. Shirley (5 May 2008)
. . . \ luke saunders (4 May 2008)
. \ Aristotle Pagaltzis (4 May 2008)
. . \ Matt S Trout (4 May 2008)
. . . \ J. Shirley (4 May 2008)
. . . \ Patrick Donelan (5 May 2008)
. . . . \ luke saunders (5 May 2008)
. . . . . \ Matt S Trout (5 May 2008)
. . . . . . \ Patrick Donelan (6 May 2008)
. . . \ Aristotle Pagaltzis (5 May 2008)
. \ Zbigniew Lukasiak (4 May 2008)
. . \ luke saunders (4 May 2008)
. . . \ Zbigniew Lukasiak (4 May 2008)
. . . . \ luke saunders (4 May 2008)
. . . . . \ Zbigniew Lukasiak (4 May 2008)
. . . . . . \ luke saunders (4 May 2008)
. \ Jonathan Rockway (4 May 2008)
. . \ luke saunders (4 May 2008)
. \ Zbigniew Lukasiak (15 May 2008)
. . \ Mark Trostler (15 May 2008)
. . . \ Zbigniew Lukasiak (15 May 2008)
. . . . \ Aristotle Pagaltzis (15 May 2008)
. . . . . \ Zbigniew Lukasiak (16 May 2008)

1 msgKill the book thread please
2 msgMore Catalyst Template Toolkit examples?
6 msgFw: high school reunion (no subject)
2 msg(no subject)
6 msgUsing URIs for my app in another program
4 msgTutorial
11 msg$row->copy causing exit from controller(!)
14 msgHow to print/display some data in an end action
Subject:Re: RFC: Catalyst::Controller::REST::DBIC
Group:Catalyst
From:J. Shirley
Date:4 May 2008


 
On Sun, May 4, 2008 at 9:02 AM, Christopher Laco <claco> wrote:
>
> Zbigniew Lukasiak wrote:
>
> > On Sun, May 4, 2008 at 3:54 PM, J. Shirley <jshirley> wrote:
> >
> > > On Sun, May 4, 2008 at 1:52 AM, Zbigniew Lukasiak <zzbbyy>
> wrote:
> > > > On Sun, May 4, 2008 at 7:05 AM, J. Shirley <jshirley>
> 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.
> > >
> >
> > Sorry but I don't understand your point - so maybe first I'll restate
> > mine. If you have primary key in the database that is of type varchar
> > (or char or ...) then 'create' is a legitimage value for that primary
> > key.
> >
> > If you just don't like the string 'id' in the URI - then I have not
> > any preference to that - it can be /foo/primary_key/ for me.
> >
>
>
> My pet peeve is that /foo/primary_key makes computers happy... but not
> people.
>
>
> /products/23
> /products/ABC-1234
>
>
> The first is the PK for a product record..
> The second is the actual sku for a product... just a unique as the pk...but
> not the PK itself...
>
>
> Now what does "id" mean in this case?
> What id your SKU is a numeric just like your PK?
>
> Two different and equally useful ways to get at the same resource.
>
> If you're talking about an interface where humans know the skus, and
> computers know the id (restfully and/or remotely).. you need a sane uri:
>
> /products/id/<id>
> /products/sku/<sku>
>
> In the end, I always run into a situation where humans (think marketing SEO
> pushers who know not of REST) want something other than a true restful uri.
>
> -=Chris
>
>
>

To be honest, I'd rather see something like /products/-{id} and
/products/{sku}. Simple checks like that make things easy, and the
'-' is inconvenient for a human but then they don't have to type a
(seemingly redundant) /sku at each time.

But also, with an index, a sku lookup should be equal to an id lookup,
so in this particular hypothetical case I would always go with the
sku. If you use DBIC or any other sufficiently sane ORM, you don't
need to ever bother directly with the primary key field, and just do
$obj->relation and be done.

_______________________________________________
List: Catalyst
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst/
Dev site: http://dev.catalyst.perl.org/


© 2004-2008 readlist.com