I move this off list because I'm not sure you want to show

On Wed, Sep 30, 2009 at 8:11 PM, Aristotle Pagaltzis <[email protected]>wrote:

> With this structure, having `auto` etc run before or after auth
> or whatever is never an issue. I also do all my auth checks
> piecemeal along the chain, thus, without complicated chains of
> conditionals in my code, dispatch determines for me how
> specifically to perform a complex auth check. And if I need to
> extract logic from several actions without affecting the URI
> structure I can add a `PathPart('') CaptureArgs(0)` action into
> the chain and voilà.
>
> I really enjoy working with this structure. It’s declarative and
> very DRY, no hairy logic, clear, simple, explicit. I ♥ Chained.
>

Shifting topics here.   I'm not quiet so in love with the chained because it
is sometimes confusing for new programmers and is a bit more challenging to
build urls in the templates.   We do used chained actions as I believe you
describe, but not everywhere.  Often the more complex auth checks happen at
the end of the action chain so it doesn't alway buy us that much.  But, that
may be just the way our URLs work.

That said, I value your comments.  Could you show an example of what you
describe  -- maybe one that has more complex auth requirements?

What I have liked is a combination of using auto() in the root and
attributes on the actions.  Every dispatch method runs auto, so it's a way
to ensure that every action is tested.  It's not a big conditional check as
the action attributes link to methods that handle the tests.    Someone
can't throw in a  : Local method any bypass checks.   But, it's not perfect
by any means (there's always ways to mess up the auth checks).  So,  If you
♥ chained that much I'll belive you have something great and  I'd love to
see more real-world examples.

Thanks,





-- 
Bill Moseley
[email protected]
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to