Survey of Surveys on HTML Templating systems / Web Frameworks (Sorting out the Technology Soup)UPDATE: I either missed Catalyst, 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!
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.
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.
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.)
UPDATE: There's a mason demo at Perl Apprenticeship Site. 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 masonbook. More promisingly, there a number of mason powered apps at mastonhq.com. Bricolage uses postgres, I may be looking at that first.
A not very satisfying demo of embperl is at Talk on Apache, mod_perl, and embperl
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.
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).
- Back in the day, he was "Frustrated about all these template models!"
- Of major modern templating systems, mentions only HTML::Template.
- The more things change, the more they stay the same.
A more current major article on the topic is perrin's Choosing a templating system also at perl.com here. (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.)
- A long article that attempts to compare all major modern perl templating systems.
- At the end it's findings are summarized as:
Pipeline or Callback
|Template Toolkit||Just Templates||Pipeline||Compiled||Mini-Language|
|Apache::ASP||Framework||Callback||Compiled||Perl and XSL|
|SSI||Just Templates||Callback||Repeated Parse||Mini-Language|
|AxKit||Framework||Pipeline||Compiled or Cached Parse Tree||Perl and XSL and Mini-Language(s)|
|HTML::Template||Just Templates||Pipeline||Cached Parse Tree||Mini-Language|
This led me to conclude I probably want to use either Mason or Embperl, as these are the two top contenders for frameworks.
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.
And, some Perlmonks threads that discuss the pros and cons of various templating systems without a clear consensus preference for a particular one.
- Started by Boo Radley, attempting to roll his own Web/CGI framework
- Recommended by princepawn on his home node.
- Corion plugs HTML::FormValidator and others agree
OO CGI Engine (Jan 2 2002)
- Discussion of OpenInteract, CGI::Application, and HTML::Template, with positive things to say about all these.
- 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.
Another perrin article that's worth a read is Building a Large-scale E-commerce Site with Apache and mod_perl, which recounts his adventures at now-defunct etoys.
- 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.
- Princepawn Stuff:
- 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.
- Web Application Frameworks and their Templating Engines with a Comparative Study of Template and HTML::Template (princepawn, apr 26 2001)
- 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
- And he pops up in various other discussions, such as Template Toolkit vs HTML::Mason (merlyn and princepawn)
- And mini-languages for MVC view/controller manipulation, which is a little flamy on Seamstress versus Mason, but not too bad.
- Merlyn Stuff:
- mason and embperl Sep 02, 2000 / Text::Template morphs into Template Toolkit vs HTML::Mason (Oct 22 2000)
- 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. ?
Dreamweaver and Perl
Jeffa wrote HTML::Template extensions for dreamweaver 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."
But it's no longer being maintained.
Two perlmonks threads about this.
- Dreamweaver/Perl integration tools (Dec 8 2001)
- 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)
- Adviced that Jeffa put together a tool that helps you manage perl from within Dreamweaver, using Dreamweaver's "Dreamweaver Template" feature
- Tphyahoo (me) mentions MasonAndDreamweaver at the MasonHQ wiki. This seems to indicate that Mason and Dreamweaver play together okay.
- HTML::Template and Dreamweaver MX (Nov 21 2003)
- Newbie asks for help with Dreamweaver and HTML::Template (not specifying he wants help with Dreamweaver Templates)
- Newbie is advised to have a look at Jeffa's tool for integration with Dreamweaver Templates (I think this advice was confused).
- 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.
- 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.
- Newbie asks for help integrating perl and dreamweaver
- Monks express general disdain for Dreamwever
Descriptions/Tutorials on particular frameworks
- Overall positive review of this (at the time) new framework
I'm sure there's a lot more, so if I get comments I will try to update as appropriate.
- likes html::formvalidator, but mentions some things that could be done better.
- At end mentions that many of his concerns are addressed by data::formvalidator
Edit by tye: Remove P tags inside TABLE