Since this topic is on the list already, here's my response on the topic.
---------- Forwarded message ----------
Date: Thu, 23 Jan 2003 13:45:02 -0500 (EST)
From: Sam Tregar <email@example.com>
To: Robert <firstname.lastname@example.org>
Subject: Re: HTML Template versus Template Toolkit
On Thu, 23 Jan 2003, Robert wrote:
Essentially, the argument in favor of using Template Toolkit is that it
is much more powerful
This is true. But with power comes great responsiblity. Are your HTML
designers ready for this responsibility?
and provides a more convenient way to pass variables to templates.
This is not true. HTML::Template provides the simplest API of any
templating module in Perl.
My understanding is that Template Toolkit is 'fat' and may require the
use of mod_perl (or something similar) to speed things up.
It's certainly a larger and slower system than HTML::Template.
HTML::Template is, to my knowledge, the fastest templating system
available for Perl. And using the (experimental and incomplete)
HTML::Template::JIT add-on, it's even faster than PHP.
Of course, the programmer in favor of using HTML Template says I should
run like hell from using anything like mod_perl.
That's odd. I use HTML::Template with mod_perl almost exclusively. The
two are a great combination and HTML::Template includes a caching mode
ideally suited to use with mod_perl.
As the author of HTML Template, I'd appreciate any thoughts or comments
you might have.
The most important issue in choosing between templating systems is your
evaluation of your HTML designers, not your programmers. HTML::Template
supports a very simple template syntax which is modeled after HTML. That
means that someone that only knows HTML can learn to create HTML::Template
templates very quickly. Contrast this to Template Toolkit, where the
template syntax is essentially an entirely new programming language to
learn, and the difference is clear.
Also, HTML::Template enforces the division between coding in Perl and
design in HTML. The movement of data is entirely one-way, from Perl code
to the template and from there to HTML in the browser. This means that
the HTML templates can be created and maintained *entirely* separately
from the Perl code. Using HTML::Template, a Perl coder does what he does
best, code in Perl, and your HTML designers do what they do best, design
All that aside, though, I don't want to leave you with the impression that
I think the Template Toolkit is no good. It's actually a very well
designed system which just happens to meet different goals than the ones I
set for HTML::Template. If you do end up using it you'll still be miles
ahead of the poor fools using JSP!
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
Html-template-users mailing list