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.

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).

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:

Application Framework

Pipeline or Callback

Parsing Method

Language

HTML::Mason

Framework

Callback

Compiled

Perl

Template Toolkit

Just Templates

Pipeline

Compiled

Mini-Language

Apache::ASP

Framework

Callback

Compiled

Perl and XSL

HTML::Embperl

Framework

Callback

Compiled

Perl

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

Text::Template

Just Templates

Pipeline

Compiled

Perl

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.

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.

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

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."

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.