[Analysis] Templates: The good, the bad, the ugly

Christopher Hicks chicks at chicks.net
Thu Dec 9 00:01:35 UTC 2004

On Wed, 8 Dec 2004, Gervase Markham wrote:
> Christopher Hicks wrote:
>> I'd love to see BZ migrate to something like Apache::ASP.  TT2 is one of 
>> the better templating systems for any language, but the syntax is just 
>> fugly.
> It's funny how these things are a matter of taste. I think the TT2 syntax is 
> more beautiful than pointy-bracketed things like JSP/PHP. But that maybe it's 
> because it's the first templating language I really used.

Relative to the majority of templating systems TT2 is awesome.  We've used 
it in a variety of major projects and except for needing to be careful not 
to abuse it into being utterly sluggish we haven't been annoyed by it. 
But earlier this year I had a totally new proejct to do and I decided to 
give Apache::ASP a try.  I was very surprised and pleased.  The set of 
facilities built into Apache::ASP makes development much less painful from 
what I've seen.  My favorite feature is not to use it in the pointy 
bracket style, but to define my own XML tags in Apache::ASP which end up 
invoking code.  This allows a number of cool things including having a 
central place that "page" tags are defined so that global look and feel 
things can be defined in one place as something that looks very much like 
an HTML file except that it has a few XML tags in it for substituting the 
paramaters that are passed into the page tag.  This presentation:


gives a good explanation of the model and I basically used that as a 
tutorial to get myself started.  That and the "eg" stuff that's included 
in the distro make it pretty easy to see how it works in practice.


"Fans of Mozilla's free, open-source Firefox browser make the
ardent Apple faithful look like a bunch of slackers."
- Rebecca Lieb at clickz.com

More information about the developers mailing list