Any Embperl / Modperl hosting ?
David Cantrell
david at cantrell.org.uk
Mon Feb 25 17:22:00 GMT 2008
On Sat, Feb 23, 2008 at 06:11:01PM +0000, Bruce Richardson wrote:
> Strictly speaking, embperl is not a templating system; it is a way of
> embedding perl in html pages. You can use it in the same way as you
> would use a templating system, if you apply very careful discipline, but
> why bother when proper templating systems are more powerful, more
> flexible and don't have the same weaknesses.
If you apply very careful discipline? Huh?
I suppose that the sort of person who might write an application as one
100,000 line file might need to be a bit more disciplined, but that
applies regardless of whether he's writing a web page or not.
And anyway, TT lets you write some really hairy logic inside the
templates. That's not a bad thing. It's a *necessary* thing. A
sensible programmer^Wtemplater will abstract that hairy logic out into a
seperate file, just like a sensible programmer would do in C or perl or
even PHP*. I know that when I switched from using my home-brew system
to using TT, all I had to change was the templates, the vast bulk of the
code didn't need to be touched, just put in a slightly different wrapper
to get it to feed the templating engine correctly.
Really, the only practical differences between Embperl and TT are:
* TT has more "mind-share" and so other people have already done quite
quite a bit of the hard work of extending it;
* TT has its own mini-language instead of re-using one that already
exists.
And that applies to TT vs your own home-brewed system too. Yes, I know
your dirty little secret, you *have* written your own templating system,
I know.
* I assume that PHP permits this?
--
David Cantrell | Minister for Arbitrary Justice
Hail Caesar! Those about to vi ^[ you!
More information about the london.pm
mailing list