You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Drew Taylor <dt...@vialogix.com> on 2000/06/09 19:20:34 UTC

[OT now] Re: Template techniques

Andy Wardley wrote:
> 
> On Jun 8,  1:56pm, Perrin Harkins wrote:
> > Not quite.  The current version uses its own system of opcodes (!) which
> > are implemented as closures.  Compiling to perl code gives much better
> > performance, which is why Andy is changing this.
> 
> Yep, Perrin's right.  Version 1 compiled templates to tree form.  Items
> in the tree were scalars (plain text) or references to directive objects
> which performed some processing (like INCLUDE another template, and so
> on).
> 
> This is actually pretty efficient when you have a limited directive set,
> but doesn't scale very well.  For version 1.00 I was more concerned
> about getting it functioning correctly than running fast (it was already
> an order of magnitude or two faster than Text::MetaText, the predecessor,
> so I was happy).  Also it was much easier to develop and evolve the toolkit
> with the tree-form architecture than when compiling to Perl, so it had some
> hidden benefit.
I was wondering if anyone had done comparisions between some of the
major templating engines. I'm thinking specifically of Template Toolkit,
Mason, HTML::Template, and EmbPerl. I currently use HTML::Template, and
am happy with it. But I am always open to suggestions.

I really like the fact that templates can be compiled to perl code &
cached. Any others besides Mason & EmbPerl (and TT in the near future)?


-- 
Drew Taylor
Vialogix Communications, Inc.
501 N. College Street
Charlotte, NC 28202
704 370 0550
http://www.vialogix.com/