I'd prefer not to comment directly, given I haven't used it that much. I can tell you what I have done though.

Page templating is done via the autohandler. The autohandler gets called for all page requests, plus it is also done in a hierarchy - if the current directory doesn't have an autohandler, it will go up a level and try the parent. As you can imagine, this makes page templating with overrides for certain web site areas rather easy.

After my autohandler has done the page setup (via broken out components, my autohandler has very little actual HTML in it), I have a line: <% $m->call_next %>. This is where whatever actual object was referenced in the URL starts being displayed/processed.

Thus, my actual documents have very little in them except basic markup. There is no need to have includes for the headers or footers, it's done automatically. I do have:

<%method title>Page title here</%method>
Which propagates up the tree, and is available to my components that generate the actual page headers and so forth.

What I haven't done yet, is any form of user interactivity, though it looks like it will be quite easy handling GET/POST requests. But so no more, since I haven't tried it yet.

Also of note (though I haven't used it yet either) is the caching ability - components can be automatically cached, and only regenerated after certain times. For example, a weather component might generate a chunk of HTML which shows the current temperature. The caching can easily ensure that it only runs say once per hour, calling components receiving the cached output in the meantime. This is a big boon for performance. I'm not sure if this works in non-persisitant (ie non mod_perl) environments.

Lastly, and perhaps most importantly, there is very good documentation available on the web site, and some good tutorials around on other sites as well.

BTW, I probably haven't explained the Mason stuff above too well, Mason diehards are welcome to go postal on any mis-uses of Mason terminology above :-).


In reply to Re: More on Web Application Frameworks by Tardis
in thread More on Web Application Frameworks by impossiblerobot

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.