<?xml version="1.0" encoding="windows-1252"?>
<node id="433729" title="Survey of Surveys on HTML Templating systems" created="2005-02-23 10:59:20" updated="2005-08-15 13:50:57">
<type id="120">
perlmeditation</type>
<author id="396583">
tphyahoo</author>
<data>
<field name="doctext">
&lt;h2&gt;Survey of Surveys on HTML Templating systems / Web Frameworks (Sorting out the Technology Soup)&lt;/h2&gt;
&lt;i&gt;UPDATE: I either missed &lt;a href="http://catalyst.perl.org"&gt;Catalyst&lt;/a&gt;, or Catalyst wasn't out yet, when I first posted this. At this point in time, I am devoting most of my "web framework learning" energy to learning this framework. Run and check it out!&lt;/i&gt;
&lt;p&gt;
I need to choose an html templating system that plays well with Dreamweaver for the design aspects, and an open source db (mysql or postgres) for the back end. 
&lt;p&gt;
Ideal would be a mock application (or open source real application) written with Mason or Embperl (my top choices) including a framework for managing the db, that's all ready to go, and I can just start tinkering with it to suit my purposes, rather than start something from scratch.  But I wasn't able to find anything like that.
&lt;p&gt;
Anyway, after spending some time doing research mainly with perlmonks and google, I thought it would be helpful to others in my situation to present a survey of my findings.  There is a LOT written about this, without a clear "winner" in the competing technology soup.  (Though as stated above, I'm beginning to lean towards Mason/Embperl.)
&lt;p&gt;

UPDATE: There's a mason demo at &lt;a href="http://apprentice.perl.org/"&gt;Perl Apprenticeship Site&lt;/a&gt;.  Unfortunately I don't think this is db enabled, but I could be wrong about that -- need to check into this more carefully.  This is the "official" sample site described in the &lt;a href=http://www.masonbook.com&gt;masonbook&lt;/a&gt;.  More promisingly, there a number of &lt;a href="http://www.masonhq.com/?MasonPoweredApps"&gt;mason powered apps&lt;/a&gt; at mastonhq.com.  Bricolage uses postgres, I may be looking at that first.
&lt;p&gt;
A not very satisfying demo of embperl is at &lt;a href="http://www.clueful.co.uk/mbeattie/presentations/oxlug-oct99/"&gt;Talk on Apache, mod_perl, and embperl&lt;/a&gt;
&lt;p&gt;
Also, [Metaperl] (aka [princepawn]) was kind enough to provide me with a demo app of his Seamstress framework.  There is no link to do this from his web page, but ask nicely and hopefully you will be in luck.  
&lt;p&gt;
Metaperl also referred me to the "bivio" framework, which also has a demo "petshop" webshop, nicely tar.gzed. (See discussion below).  However, in [The Bivio Model and Algorithm for Authorization (slides available)], Metaperl notes that even after intensive study bivio strained his powers of understanding... which I find kind of scary.  So, I may choose to study bivio as an example of a really cool framework, but do my real work in Mason (or possibly Seamstress).
&lt;hr&gt;
&lt;h2&gt;Overview&lt;/h2&gt;
&lt;readmore&gt;
Of hisorical interest may be &lt;a href="http://jonas.liljegren.org/perl/ideas/letter.txt"&gt;jonas liljegren's rant&lt;/a&gt; (undated, my guess is 1999 or before)
&lt;ul&gt;
&lt;li&gt;Back in the day, he was "Frustrated about all these template models!"&lt;/li&gt;  
&lt;li&gt;Of major modern templating systems, mentions only HTML::Template.&lt;/li&gt;
&lt;li&gt;The more things change, the more they stay the same.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
A more current major article on the topic is [perrin]'s &lt;a href="http://perl.apache.org/docs/tutorials/tmpl/comparison/comparison.html"&gt;Choosing a templating system&lt;/a&gt; also at perl.com &lt;a href="http://www.perl.com/pub/a/2001/08/21/templating.html?page=1"&gt;here&lt;/a&gt;.  (Last major change Jun 5 2002, originally written Sep 21 2001.  I gave both urls since the article appears to be updated occasionally, so maybe one is more current than the other.)
&lt;ul&gt;
&lt;li&gt;A long article that attempts to compare all major modern perl templating systems.&lt;/li&gt;  
&lt;li&gt;At the end it's findings are summarized as:&lt;/li&gt;
&lt;/ul&gt;
&lt;table border="0" cellpadding="1" cellspacing="1"&gt;
    &lt;tbody&gt;&lt;tr&gt;
      &lt;th class="table-title-bg"&gt;&lt;br&gt;&lt;/th&gt;
      &lt;th class="table-title-bg"&gt;
      &lt;div class="table-title"&gt;
        Application Framework
      &lt;/div&gt;
      &lt;/th&gt;
      &lt;th class="table-title-bg"&gt;
      &lt;div class="table-title"&gt;
        Pipeline or Callback
      &lt;/div&gt;
      &lt;/th&gt;
      &lt;th class="table-title-bg"&gt;
      &lt;div class="table-title"&gt;
        Parsing Method
      &lt;/div&gt;
      &lt;/th&gt;
      &lt;th class="table-title-bg"&gt;
      &lt;div class="table-title"&gt;
        Language
      &lt;/div&gt;
      &lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class="table-bg"&gt;
        HTML::Mason
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Framework
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Callback
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Compiled
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Perl
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class="table-bg"&gt;
        Template Toolkit
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Just Templates
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Pipeline
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Compiled
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Mini-Language
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class="table-bg"&gt;
        Apache::ASP
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Framework
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Callback
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Compiled
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Perl and XSL
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class="table-bg"&gt;
        HTML::Embperl
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Framework
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Callback
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Compiled
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Perl
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class="table-bg"&gt;
        SSI
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Just Templates
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Callback
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Repeated Parse
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Mini-Language
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class="table-bg"&gt;
        AxKit
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Framework
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Pipeline
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Compiled or Cached Parse Tree
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Perl and XSL and Mini-Language(s)
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class="table-bg"&gt;
        HTML::Template
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Just Templates
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Pipeline
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Cached Parse Tree
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Mini-Language
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class="table-bg"&gt;
        Text::Template
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Just Templates
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Pipeline
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Compiled
      &lt;/td&gt;
      &lt;td class="table-bg"&gt;
        Perl
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;
This led me to conclude I probably want to use either Mason or Embperl, as these are the two top contenders for frameworks.
&lt;p&gt;
Pertinent to perl newbies for getting started on web apps is [How to calculate development time?].  Newbie (at the time) Siddharta asks, and gets, advice for building a web application from scratch.  This is mainly about estimating project time, but there is also a lot of advice on which framework to use.  Good thread.
&lt;p&gt;
And, some Perlmonks threads that discuss the pros and cons of various templating systems without a clear consensus preference for a particular one.
&lt;p&gt;
[What is the best tool to embed perl in HTML?] (Q&amp;A, August 2, 2000) / [Best templating system?] (Jun 30 2000)
&lt;li&gt; Mason, Embperl, and Template are recommended by various monks.&lt;/li&gt;
&lt;li&gt; It's stated that Embperl plays well with Dreamweaver&lt;/li&gt;
&lt;/ul&gt;
[Refining the CGI process through structure and templates] (Apr 16, 2001, Boo Radley)
&lt;ul&gt;
&lt;li&gt; Started by [Boo Radley], attempting to roll his own Web/CGI framework &lt;/li&gt;
&lt;li&gt; Recommended by princepawn on his home node.&lt;/li&gt;
&lt;li&gt; Corion plugs [HTML::FormValidator] and others agree&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
[OO CGI Engine] (Jan 2 2002)
&lt;ul&gt;
&lt;li&gt;Discussion of OpenInteract, CGI::Application, and HTML::Template, with positive things to say about all these.&lt;/li&gt;
&lt;li&gt; dnmiller2k mentions that CGI::Application uses HTML::Template, but Swiftone counters that this is just for installation, and you can use it with Template-Toolkit if you want.&lt;/li&gt;
&lt;/ul&gt;

Update: No demo for "open interact", at least none that I could find.  But supposedly it's &lt;a href="http://www.openinteract.org/demo/"&gt;coming soon&lt;/a&gt;.
&lt;p&gt;
Another [perrin] article that's worth a read is  &lt;a href="http://www.perl.com/pub/a/2001/10/17/etoys.html?page=1"&gt;Building a Large-scale E-commerce Site with Apache and mod_perl&lt;/a&gt;, which recounts his adventures at &lt;a href="http://www.dailytimes.com.pk/default.asp?page=story_28-5-2002_pg5_11"&gt;now-defunct&lt;/a&gt; etoys.

&lt;/readmore&gt;
&lt;hr&gt;
&lt;h2&gt;[Princepawn]/[Metaperl]/[Merlyn] Stuff&lt;/h2&gt;
&lt;readmore&gt;
&lt;ul&gt;
&lt;li&gt;[Princepawn] and [Merlyn] have posted much information and musing on this topic.  Of course there are others, but for some reason I kept coming across these two in my own researches.&lt;/li&gt;  
&lt;li&gt;[Princepawn] Stuff:&lt;/li&gt;
	&lt;ul&gt;
	&lt;li&gt;Princepawn has come up with his own framework, Seamstress, though I'm not sure how serious he is about it.  His node has a list of various perl html templating frameworks, including a lot of obscure ones.&lt;/li&gt;
	&lt;li&gt;[Web Application Frameworks and their Templating Engines with a Comparative Study of Template and HTML::Template] (princepawn, apr 26 2001)&lt;/li&gt;
	&lt;li&gt;In [rant on = qw(HTML::Mason Embperl Template etc) ;] (Nov 09, 2001) princepawn argues that his Seamstress is better than the alternatives. Criticizes not only Mason, but also Embperl and Template.  I think this puts princepawn in a similar camp as merlyn, along the lines that flexibility is more valuable than an extended heavily used/tested framework like mason which has overhead that never gets used, or that gets in the way.  But maybe I'm oversimplifying&lt;/li&gt;
	&lt;li&gt;And he pops up in various other discussions, such as [Template Toolkit vs HTML::Mason] (merlyn and princepawn)&lt;/li&gt;
	&lt;li&gt;And [mini-languages for MVC view/controller manipulation], which is a little flamy on Seamstress versus Mason, but not too bad.&lt;/li&gt;
	&lt;/ul&gt;
&lt;li&gt;[Merlyn] Stuff:&lt;/li&gt;
	&lt;ul&gt;
	&lt;li&gt;[mason and embperl] Sep 02, 2000 / [Text::Template] morphs into [Template Toolkit vs HTML::Mason] (Oct 22 2000)&lt;/li&gt;
	&lt;li&gt; Merlyn used mason for a while and likes it, but eventually switches over to template toolkit.  I think for him, Template Toolkit is just the more flexible option.  Merlyn is a perl wizard though... maybe for a beginner Mason would be more appropriate. ?&lt;/li&gt;
	&lt;/ul&gt;
&lt;/ul&gt;
&lt;/readmore&gt;
&lt;hr&gt;
&lt;h2&gt;Dreamweaver and Perl&lt;/h2&gt;
&lt;readmore&gt;
&lt;p&gt;
Jeffa wrote &lt;a href="http://jeffa.perlmonk.org/dreamweaver"&gt;HTML::Template extensions for dreamweaver&lt;/a&gt; which enables you to "se HTML::Template tags in Dreamweaver just like they would any other object - by clicking on an icon which places the resulting HTML code in the document." 
&lt;p&gt;
But it's no longer being maintained.  
&lt;p&gt;
Two perlmonks threads about this.
&lt;ul&gt;
&lt;li&gt;[Dreamweaver/Perl integration tools] (Dec 8 2001)&lt;/li&gt;
	&lt;ul&gt;
	&lt;li&gt; User wants help integrating Dreamweaver Templates (a Dreamweaver feature not to be confused with perl templating) and perl (doesn't specify which perl web framework) &lt;/li&gt;
	&lt;li&gt; Adviced that [Jeffa] put together a tool that helps you manage perl from within Dreamweaver, using Dreamweaver's "Dreamweaver Template" feature&lt;/li&gt;
	&lt;li&gt; Tphyahoo (me) mentions &lt;a href="http://www.masonhq.com/?MasonAndDreamweaver"&gt;MasonAndDreamweaver&lt;/a&gt; at the MasonHQ wiki.  This seems to indicate that Mason and Dreamweaver play together okay.&lt;/li&gt;
	&lt;/ul&gt;
&lt;li&gt;[HTML::Template and Dreamweaver MX] (Nov 21 2003)&lt;/li&gt;
	&lt;ul&gt;
	&lt;li&gt; Newbie asks for help with Dreamweaver and HTML::Template (not specifying he wants help with Dreamweaver Templates)&lt;/li&gt;
	&lt;li&gt; Newbie is advised to have a look at Jeffa's tool for integration with Dreamweaver Templates (I think this advice was confused).&lt;/li&gt;
	&lt;li&gt; Jeffa states that he hasn't been maintaining this since 2001, and it's now out of date since there have been a lot of changes with Dreamweaver MX.  "Dreamweaver is a "funky beast" says Jeffa.&lt;/li&gt;
	&lt;li&gt; Tphyahoo (me) mentions that Dreamweaver Templates are a special Dreamweaver feature, which aren't used on every project, and suggests Mason, linking back to the 2001 article.&lt;/li&gt;
	&lt;/ul&gt;
&lt;/ul&gt;
Also found [CGI.pm - Dreamweaver or somesuch?] (April 2001)
&lt;ul&gt;
&lt;li&gt; Newbie asks for help integrating perl and dreamweaver&lt;/li&gt;
&lt;li&gt; Monks express general disdain for Dreamwever&lt;/li&gt;
&lt;/ul&gt;

Conclusion: Dreamwever Templates and perl, maybe not such a good idea.  However, Dreamwever and Mason, maybe not such a bad idea.  Also [What is the best tool to embed perl in HTML?] stated that Embperl and Dreamweaver is ok.
&lt;hr&gt;
&lt;/readmore&gt;
&lt;h2&gt;Descriptions/Tutorials on particular frameworks&lt;/h2&gt;
&lt;readmore&gt;
[HTML::Mason module review] (Feb 1 2001)
&lt;ul&gt;
&lt;li&gt;Overall positive review of this (at the time) new framework&lt;/li&gt;
&lt;/ul&gt;
Perl.com article &lt;a href="http://www.perl.com/pub/a/2001/06/05/cgi.html"&gt;Using CGI Application&lt;/a&gt; (June 5 2001)
&lt;p&gt;
I'm sure there's a lot more, so if I get comments I will try to update as appropriate.
&lt;/readmore&gt;
&lt;h2&gt;Other stuff&lt;/h2&gt;
&lt;readmore&gt;&lt;p&gt;
[proposal for HTML::FormValidator upgrade] 
&lt;ul&gt;
&lt;li&gt;likes html::formvalidator, but mentions some things that could be done better.&lt;/li&gt;
&lt;li&gt;At end mentions that many of his concerns are addressed by data::formvalidator&lt;/li&gt;
&lt;/ul&gt;
&lt;/readmore&gt;

&lt;p&gt;&lt;small&gt;Edit by [tye]: Remove P tags inside TABLE&lt;/small&gt;&lt;/p&gt;</field>
</data>
</node>
