I think people choose templating engines depending on how they want to use
it. For me, HTML::Template is fairly ideal because it encourages me to focus
on the business logic, and abstracts the presentation fairly well. By
allowing only simple tag replacements and loops, it has so far allowed me to
do everything I needed to do on the Web.

There are arguments on how much a templating engine 'should' offer. Some
like the engine to accept 'codelets', others (like me) prefer to keep it as
simple as possible. For this reason I have found it difficult to accept
Mason and Template Toolkit.

----- Original Message ----- 
From: "Jonathan" <[EMAIL PROTECTED]>
To: "Michael Greenish" <[EMAIL PROTECTED]>
Cc: "mod_perl" <modperl@perl.apache.org>
Sent: Friday, February 17, 2006 2:16 AM
Subject: Re: A question for the newbies


>
> On Feb 16, 2006, at 12:48 PM, Michael Greenish wrote:
>
> > What I like about PHP over perl is the ease of
> > variable declaration.  I feel I have to use strict
> > with perl, I would like the ability to not have to put
> > "my" in front of every new variable.
>
> putting my / our before variables is good though.
>
> > is the templating.  I haven't found a template module
> > in perl that rivals Smarty templates in PHP.
>
> Have you looked at Template::Toolkit ? Or Mason ?
>
> > any array element with ".".  Smarty plugin's are
> > great.  They help with creating select drop downs,
> > date drop downs.  I can capitalize, count, strip
> > template variables within smarty
> All the perl templating engines allow that.  there's also FormBuilder
> and other things
>
> > so much more I can do with Smarty than with
> > HTML::Template.  Maybe I just missed all that stuff in
> > the documentation but again, I didn't find it.  Also,
> > it's much easier to include a code snippet in php than
> > in perl.
> HTML::Template is a simple barebones templating system.  its not a
> robust approach like Smarty.  You should be looking at TT and MAson.
>
> > Today, Perl is still my personal favorite language to
> > code for web/unix task.  However at work, I am
> > implementing MVC in PHP 4 much like I did with Perl
> > using the basic OO capabilities available in 4.
> > Interface functions don't help in the web apps I do
> > (small - medium) so I don't see to much need for us to
> > move to 5.  But that's another topic.
> I'd suggest looking at TAL the Template Attribute Language.  The
> specification is on the Zope website (python).  There are perl and
> php implementations (be warned though, the php version is a bit slow,
> so i suggest using a code caching system like eaccelerator with it).
> It's rather nice if you're doing cross-language development, because
> the same templates will work in just about any language.
>
>
>

Reply via email to