On Wed, Aug 24, 2011 at 4:24 AM, Graham Higgins <[email protected]> wrote:
> Q: Are using Handlers kinda frowned upon? Coming from Pylons and
> sorta at a fork-in-the-road of whether I should just abandon my old habits
> or not
> raydeo:  they are fine.. you don't gain a lot by using them though,
> especially if
>              you don't care about dispatching to a view based on {action}
> patterns

There are two things you lose with @view_config. One, routing details
are pushed into the view modules, while Handlers and Pylons try to
make a complete separation between the functionality of the actions
and which URL they're called by. Although in this new format, the
commonality is the route name rather than the URL pattern, so that
maintains some independence from the URL.

If you use 'match_param='action=logout'', that puts more routing
detail into the view method than I'm comfortable with at first glance,
but I guess it's essentially the same as having multiple @action's on
the same view method, with the advantage that the match variable is
called by its own proper name ('action') rather than 'name'.

The other disadvantage of @view_config is you have to use
Config.scan(), which, while it has been working fine in Pyramid 1,
still seems a bit magical to me.

I don't think I'll change Akhet since its purpose remains to be
Pylons-like, but I'll add "something" to the manual that suggests this
new structure should also be considered.

The debug toolbar sounds interesting; I'll have to check it out.

-- 
Mike Orr <[email protected]>

-- 
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