[Templates] mod_tt - whither the enthusiasm?
Tom Insam
tom@jerakeen.org
Tue, 29 Aug 2006 10:21:53 +0100
> http://jerakeen.org/code/mod_tt/ describes the module as 'a very early
> development version,' which certainly means I cannot use it in
> production.
A lot of the reason for the module was a 'can I do this?'. I got it to
the point that it built and rendered .tt files, asked the TT list about
it, and stopped till I got more feedback.
> It still looks interesting to me: TT2 was alpha once too, I suppose. But
> how is mod_tt implimented? Does it require mod_perl or just perl? What
> are the benchmarks against a more standard TT implementation? Doesn't TT
> have caching support?
It doesn't need mod_perl, that was the point, really. My plan at the
time was that mod_perl was irritatingly hard to build, not very reliable
as a module instead of properly built into apache (which was even harder
to build - ever built mod_ssl and mod_perl linked into the same httpd?)
and _far_ too powerful (I really don't need to be able to write my
httpd.conf in perl).
mod_tt also runs every request in a separate perl instance, so that
different templates in different vhosts can't interfere with each other.
It's impossible to run more than one mod_perl application in a single
apache process in a secure fashion.
Benchmarks? Yikes. The thing runs. That's as far as I got, frankly. The
startup time of TT is _nuts_, so if I wanted to keep the 'distinct
interpreter per processes' thing, it would be slow. Probably better
would be something like the way mod_python handles things - you get a
separate python context per vhost, with apache directives you can use to
either use the same instance between hosts, or further subdivide inside
the tree. Somewhere there's a long TODO list for the thing..
> If I wrote a HOWTO on TT/mod_perl installation, would that remove the
> need for mod_tt?
Not really. One of the points of mod_tt was a statement of 'look, this
could theoretically compete with php'. You drop .tt files into a folder,
and it works. No ISP would ever give you mod_perl shared hosting, but if
mod_tt was reliable and stable, I could see them offering _that_. But
maybe not. The world has moved on a little since then, we have Catalyst
and Rails and Django, and hundreds of other frameworks - the Large
Heavyweight Framework With Templating Engine pattern is the hip thing to
be playing with now.
Plus, as far as I'm concerned, mod_perl installation consists of apt-get
install libapache-mod-perl most of the time.
tom