in reply to newbie question: Mason, CGI::App, MVC
So my question is: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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: newbie question: Mason, CGI::App, MVC
by jk2addict (Chaplain) on Sep 03, 2002 at 17:41 UTC |