>hi, i'm sure many of us have had situations like this,
>but that doesn't mean that everyone who wants to do
>some templating is going to fall into the same trap
>every time.

The problem is that not every feature comes off looking like a trap.


>- trivial to install and to use

It's rare that I need to do anything more than 'perl Makefile.PL && 
make && make install' when I install modules.  If I use CPAN.pm, it's 
even easier.  Installation of any perl module trivial (under Un*x, at 
least).

>- small disk footprint

I can't remember the last time I had a "disk space" problem because 
of a perl module.  It's not like we're talking about Megs of disk 
space (TT might come close).  2 gigs will hold all of RH 7.0 
(including X) and any perl modules you could possibly want.

>- small memory footprint

At current memory prices (128 MB for $25), I consider this point very 
weak.  I use about 300 modules within my system, and the total size 
of the httpd is 30 MB.  On a system with 1 GB of RAM, I can run about 
200 processes easily.  Most people don't have 300 modules, so I 
suspect httpd to be much smaller.

>- fast, with little overhead to begin with.

You don't use a templating system because it's fast.  You use it 
because it's faster to develop.  It's the same reason people choose 
to use Perl instead of C.

>- very basic non-syntax

I'm a little confused by this one....  There are templating system 
like Mason that have their own tags ([+  +]) and systems like 
Text::Template that use <HTML> style tags.  Both are pretty easy for 
programmers to understand, but designers (the people using the 
templating system) will probably find Text::Template simpler and 
easier to learn and use.

>- extensibility via sub-classing.

This is notably where many templating systems come up short.  I think 
TemplateToolkit provides the most flexibility in this area. 
Text::Template, while not sub-classable, is easily wrapped.

I'm not trying to suggest that what you've written isn't "worthy." 
I'm only making a point about templating systems.  If your goal is to 
write a templating system, you shouldn't just look at what already 
exists and strip out the stuff you feel isn't important.  If you 
really want to help, you should consider contributing to existing 
templating systems to find the happy medium you're looking for.

Robert Landrum

--
"A good magician never reveals his secret; the unbelievable trick
becomes simple and obvious once it is explained. So too with UNIX." 

Reply via email to