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

J. Paul Reed preed at sigkill.com
Tue Dec 7 00:05:45 UTC 2004


On 06 Dec 2004 at 18:34:42, Jake arranged the bits on my disk to say:

> What went wrong?
> 
> While it's true that the presentation and the perl code are now seperate
> from each other, there is still a lot of code in the middle of this
> presentation. This code is in the form of template directives, some of
> which are just as complicated as perl code. Also frustrating is the fact
> that the template directives are basically another programming language
> to deal with and have no support for context colorization is most common
> editors (vim, emacs, etc).

Or, put another way: we could've used something lighter weight than
Template Toolkit.

Templating engines that make you learn/use a new language (when the one you
have is perfectly fine) are annoying. Use of a templating engine like TT in
Perl is debatable; use of similar engines in PHP is completely asinine.

Also, there are some templates that use callbacks to call back into
perl-code to do more work; when mail gets sent, this happens.

It's ugly and should be replaced... but it was originally done that way to
keep the same behavior as the old stuff (where email addresses showed up as
mail was sent to them).

Later,
Paul
------------------------------------------------------------------------
J. Paul Reed -- 0xDF8708F8 || preed at sigkill.com || web.sigkill.com/preed
Math, my dear boy, is nothing more than the lesbian sister of biology.
                                            -- Peter Griffin, Family Guy

I use PGP; you should use PGP too... if only to piss off John Ashcroft



More information about the developers mailing list