You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Ken Y. Clark" <kc...@logsoft.com> on 2003/07/18 22:26:02 UTC

Re: templating system opinions

On Fri, 18 Jul 2003, Patrick Galbraith wrote:

> Date: Fri, 18 Jul 2003 14:25:32 -0700 (PDT)
> From: Patrick Galbraith <pa...@patg.net>
> To: modperl@perl.apache.org
> Subject: templating system opinions
>
> Hi there,
>
> Just wondering what the best templating system is to use and/or learn.
>
> I've briefly read up on the pros and cons of each, and am just wondering
> which one is the most widely _used_ and best to learn if you're wanting to
> know something that there are jobs for.
>
> thanks ;)

Search the guide:

http://perl.apache.org/search/swish.cgi?query=template&sbm=&submit=search

ky

Re: templating system opinions

Posted by Chris Winters <ch...@cwinters.com>.
Perrin Harkins wrote:
>>The one thing about TT was that I don't know if I really liked how it 
>>had a different syntax than perl. Plus, as far as performance, we did 
>>some specific coding to make it faster for Slash so our templates would 
>>be in the DB.
> 
> That's an anti-optimization.  Filesystems are faster than databases when
> all you want is to fetch a single item with a specific name.  It's also
> a pain in the ass to edit things that are in a database, as opposed to
> just files.

I agree -- filesystems have all these great new remote access 
protocols like ftp and scp. That's why I took this option (storing 
templates in the database) out of OpenInteract. Well, actually you 
can still do it, I just make it really tough :-)

Chris

-- 
Chris Winters (chris@cwinters.com)
Building enterprise-capable snack solutions since 1988.


Re: templating system opinions

Posted by Perrin Harkins <pe...@elem.com>.
On Fri, 2003-07-18 at 18:37, Patrick Galbraith wrote:
> The one thing about TT was that I don't know if I really liked how it 
> had a different syntax than perl. Plus, as far as performance, we did 
> some specific coding to make it faster for Slash so our templates would 
> be in the DB.

That's an anti-optimization.  Filesystems are faster than databases when
all you want is to fetch a single item with a specific name.  It's also
a pain in the ass to edit things that are in a database, as opposed to
just files.

- Perrin

Re: templating system opinions

Posted by Patrick Galbraith <pa...@patg.net>.
The one thing about TT was that I don't know if I really liked how it 
had a different syntax than perl. Plus, as far as performance, we did 
some specific coding to make it faster for Slash so our templates would 
be in the DB.

On 18 Jul 2003, Mark Maunder wrote:

> Hey Peter,
> 
> Template Toolkit rocks! (Sorry about the overt glee, but I am just
> finishing a project where it has been very good to me) Besides the
> complete seperation that it gives you between presentation and back-end
> coding, it's super fast. I benchmarked a 2GHz server with 256 Megs of
> RAM using ab (Apache bench) with around 10 concurrent requests and a
> total of 10,000 requests and was able to handle over 40 hits per second
> on our most dynamic page which has lots of conditionals and loops and
> even does a few function calls like this [% IF sess.is_logged_in %]
> where 'sess' is a perl object. NOTE: Make sure you cache your template
> object in package globals or something like that, or you'll lose
> performance.
> 
> I've written a couple of workable templating systems myself with good
> old $html =~ s///egs and a content handler (as a perl developers rite of
> passage don't ya know) and I wouldn't recommend it because you end up
> with something non-standard, and are basically re-inventing template
> toolkit which seems to have become the standard in templating over the
> last coupla years.
> 
> Old, but still useful benchmarks if you're interested:
> http://www.chamas.com/bench/
> 
> mark.
> 
> On Fri, 2003-07-18 at 13:26, Ken Y. Clark wrote:
> > On Fri, 18 Jul 2003, Patrick Galbraith wrote:
> > 
> > > Date: Fri, 18 Jul 2003 14:25:32 -0700 (PDT)
> > > From: Patrick Galbraith <pa...@patg.net>
> > > To: modperl@perl.apache.org
> > > Subject: templating system opinions
> > >
> > > Hi there,
> > >
> > > Just wondering what the best templating system is to use and/or learn.
> > >
> > > I've briefly read up on the pros and cons of each, and am just wondering
> > > which one is the most widely _used_ and best to learn if you're wanting to
> > > know something that there are jobs for.
> > >
> > > thanks ;)
> > 
> > Search the guide:
> > 
> > http://perl.apache.org/search/swish.cgi?query=template&sbm=&submit=search
> > 
> > ky
> 

-- 
Patrick Galbraith
Senior Software Developer
pgalbraith@classmates.com
patg@patg.net capttofu@slashdot.org


Re: templating system opinions

Posted by Mark Maunder <ma...@ziptree.com>.
Hey Peter,

Template Toolkit rocks! (Sorry about the overt glee, but I am just
finishing a project where it has been very good to me) Besides the
complete seperation that it gives you between presentation and back-end
coding, it's super fast. I benchmarked a 2GHz server with 256 Megs of
RAM using ab (Apache bench) with around 10 concurrent requests and a
total of 10,000 requests and was able to handle over 40 hits per second
on our most dynamic page which has lots of conditionals and loops and
even does a few function calls like this [% IF sess.is_logged_in %]
where 'sess' is a perl object. NOTE: Make sure you cache your template
object in package globals or something like that, or you'll lose
performance.

I've written a couple of workable templating systems myself with good
old $html =~ s///egs and a content handler (as a perl developers rite of
passage don't ya know) and I wouldn't recommend it because you end up
with something non-standard, and are basically re-inventing template
toolkit which seems to have become the standard in templating over the
last coupla years.

Old, but still useful benchmarks if you're interested:
http://www.chamas.com/bench/

mark.

On Fri, 2003-07-18 at 13:26, Ken Y. Clark wrote:
> On Fri, 18 Jul 2003, Patrick Galbraith wrote:
> 
> > Date: Fri, 18 Jul 2003 14:25:32 -0700 (PDT)
> > From: Patrick Galbraith <pa...@patg.net>
> > To: modperl@perl.apache.org
> > Subject: templating system opinions
> >
> > Hi there,
> >
> > Just wondering what the best templating system is to use and/or learn.
> >
> > I've briefly read up on the pros and cons of each, and am just wondering
> > which one is the most widely _used_ and best to learn if you're wanting to
> > know something that there are jobs for.
> >
> > thanks ;)
> 
> Search the guide:
> 
> http://perl.apache.org/search/swish.cgi?query=template&sbm=&submit=search
> 
> ky
-- 
Mark Maunder <ma...@ziptree.com>
ZipTree Inc.


Re: templating system opinions

Posted by Stas Bekman <st...@stason.org>.
Jesse Erlbaum wrote:
> Hey Ken --
> 
> 
>>Search the guide:
>>
>>http://perl.apache.org/search/swish.cgi?query=template&sbm=&submit=sear
> 
> ch
> 
> 
> I'm deeply amused that there are nearly as many articles about
> templating systems on perl.apache.org (30) as there are templating
> modules on CPAN!

The search shows matching sections, not articles. Most of these matches belong 
to a single tutorial:
http://perl.apache.org/docs/tutorials/tmpl/comparison/comparison.html


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


RE: templating system opinions

Posted by Jesse Erlbaum <je...@erlbaum.net>.
Hey Ken --

> Search the guide:
> 
>http://perl.apache.org/search/swish.cgi?query=template&sbm=&submit=sear
ch


I'm deeply amused that there are nearly as many articles about
templating systems on perl.apache.org (30) as there are templating
modules on CPAN!


TTYL,

-Jesse-


--

  Jesse Erlbaum
  The Erlbaum Group
  jesse@erlbaum.net
  Phone: 212-684-6161
  Fax: 212-684-6226