Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: newbie question: Mason, CGI::App, MVC

by nop (Hermit)
on Sep 03, 2002 at 17:25 UTC ( #194822=note: print w/ replies, xml ) Need Help??


in reply to newbie question: Mason, CGI::App, MVC

Thanks, Arguile! Perin's article was right on track, and helps me rephrase my question. Perin states:

The pipeline style does all the work up front in a standard CGI or mod +_perl handler, then decides which template to run and passes some dat +a to it. The template has no control flow logic in it, just presentat +ion logic, e.g. show this graphic if this item is on sale. Popular sy +stems supporting this approach include HTML::Template and Template To +olkit. The callback model works well for publishing-oriented sites where the +pages are essentially mix and match sets of articles and lists. Ideal +ly, a site can be broken down into visual ``components'' or pieces of + pages that are general enough for an HTML coder to recombine them in +to entirely new kinds of pages without any help from a programmer. [snip] The pipeline model is more like a traditional model-view-controller de +sign. Working this way can provide additional performance tuning oppo +rtunities over an approach where you don't know what data will be nee +ded at the beginning of the request. You can aggregate database queri +es, make smarter choices about caching, etc. It can also promote a cl +eaner separation of application logic and presentation. However, this + approach takes longer to get started with since it's a bigger concep +tual hurdle and always involves at least two files: one for the Perl +code and one for the template.
So my question is:
am I on the wrong track to consider Mason when I want to use a pipeline model, eg M-V-C?


Comment on Re: newbie question: Mason, CGI::App, MVC
Download Code
Re: Re: newbie question: Mason, CGI::App, MVC
by jk2addict (Chaplain) on Sep 03, 2002 at 17:41 UTC
    <blatent whoring on my part>

    Disclaimer: I'm a big AxKit fan.

    If you are really into the pipeline style of web programming, also take a look at AxKit/Cocoon. They seem to be more geared towards true app logic pipelines instead of templating. Maybe it's just me, and the examples on Mason never stood out as pipelining vs. includes. Could anyone who has used both shed some light?

    Introducing AxKit
    XSP, Taglibs and Pipelines
    Taglib TMTOWTDI

    Getting started is a little slow, but the benefits later are well worth it.

    </blatent whoring on my part>

    Updated: s/Cacoon/Cocoon/

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://194822]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2014-10-21 21:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (110 votes), past polls