http://www.perlmonks.org?node_id=830668

Catalyst has dispatch logic "scattered" everywhere as subroutine attributes. Contrast this with the centralized control in CGI::Application or CGI::Prototype

DBIx::Class coordinates table relations by isolating each table in a package. Contrast this with the single-file centralized modelling in DBIx::DataModel

App::Cmd figures out dispatch logic by looking for Yourapp::Command::* modules and loading them. Contrast this with the centralized, manual listing required in CLI::Framework.

And we have things like HTML::Mason and Template where control is decentralized and placed at the point of effect, in contrast with push-style templating systems which tend to centralize control in a single subroutine.


Replies are listed 'Best First'.
Re: decentralized control and coordination
by ww (Archbishop) on Mar 24, 2010 at 20:49 UTC
    And the sun comes up in the east?

    Sorry, but read that as shorthand for "your point is? Please elaborate"

Re: decentralized control and coordination
by IBlowGoatsSucker (Beadle) on Mar 24, 2010 at 22:29 UTC
    Catalyst has dispatch logic "scattered" everywhere as subroutine attributes. Contrast this with the centralized control in CGI::Application or CGI::Prototype

    It is like an ant-hill to a whale.

    DBIx::Class coordinates table relations by isolating each table in a package. Contrast this with the single-file centralized modelling in DBIx::DataModel

    X-Wings swarm in formation, Death Star is defeated.

    App::Cmd figures out dispatch logic by looking for Yourapp::Command::* modules and loading them. Contrast this with the centralized, manual listing required in CLI::Framework.

    The hard shell of the oyster conceals the shiny Perl inside. It feeds on slime yet brings forth beauty.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: decentralized control and coordination
by jdrago999 (Pilgrim) on Mar 27, 2010 at 18:55 UTC

    I prefer to "isolate" table relations in their own packages using Class::DBI::Lite. ASP4 allows me to keep my presentation-focused logic right there at the "point of effect" while stashing my business logic in output-neutral "Form Handlers". URL Routing (often subject to change) can be declared once within the config and managed by ASP4x::Router - becoming completely transparent to the pages or handlers they route to.

    Perl offers multiple ways to get the same thing done - depending on what you are trying to do. I dislike "action at a distance" so I avoid spreading things across too many places to look. I'm sure that in the case of Catalyst after a while a kind of "rhythm" emerges which helps you know where to find out where a particular URI would map to - but you could really trip yourself up if you weren't careful.