mason, part 2
having spent a week or two on a little web site project that uses perl mason, i can share a few more impressions. first, mason now seems more to me like smarty (for php) than it did a few weeks ago.
most importantly, the project has met the goal of a templating system- separation of presentation and logic. all viewable web pages end with the "html" extension. these can either include other html pages or can call mason components which return values but not HTML. these files end with a "mas" extension. these extensions are arbitrary as is the separation between the two types of files. the mason-apache configuration file lets HTML files be shown through the browser and hides from the browswer .mas and .pl (and dhandler) files. the .mas files can themselves call other .mas files or can include and call perl code contained in other perl modules. these would not be called directly from an HTML page. part of the scheme is based on research and part on my own idea of how the separation could occur. all of it can be changed and reconfigured.
mason has no problem with included javascript which gives it a big advantage over smarty to start with. one seeming limitation right now is that an HTML page cannot call multiple subroutines contained within a single file containing code. a separate .mas component has to be created for each different call.
most importantly, the project has met the goal of a templating system- separation of presentation and logic. all viewable web pages end with the "html" extension. these can either include other html pages or can call mason components which return values but not HTML. these files end with a "mas" extension. these extensions are arbitrary as is the separation between the two types of files. the mason-apache configuration file lets HTML files be shown through the browser and hides from the browswer .mas and .pl (and dhandler) files. the .mas files can themselves call other .mas files or can include and call perl code contained in other perl modules. these would not be called directly from an HTML page. part of the scheme is based on research and part on my own idea of how the separation could occur. all of it can be changed and reconfigured.
mason has no problem with included javascript which gives it a big advantage over smarty to start with. one seeming limitation right now is that an HTML page cannot call multiple subroutines contained within a single file containing code. a separate .mas component has to be created for each different call.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home