>
> Maybe.  The action name implies the nature of the ID.  And you have to
> validate/convert the ID anyway, so 'id' is not necessarily the same as
> 'acct' or 'name'.  Action methods by definition take routing variables
> as-is, so ``.get_byacct(self, id)`` is not necessarily bad.  You
> should arguably have a separate set of business methods in the model
> that take the real identifiers, to separate the business logic from
> the HTTP UI (which is what the actions are).
>
> --
> Mike Orr <[email protected]>

That's all fine until you want to nest resources, and then you're
forced to rename at least one of the id's (conventionally the parent's
- at least in Rails) anyway.  Why not use meaningful names
throughout?  As the author of described_routes I'm interested in
machine readable representations of resource structure so I care more
than most about consistency, but what argument is there in favour of
"id" other than it requires no thought on the part of the developer?

Regards,

Mike
[email protected]
http://positiveincline.com
http://twitter.com/asplake

--

You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.


Reply via email to