[Debtags-devel] Template engines

Erich Schubert erich.schubert at gmail.com
Mon Sep 19 23:46:56 UTC 2005


[adding debtags list to recipients, since the mail was obviously for the list]

2005/9/19, Sanghyeon Seo <sanxiyn at gmail.com>:
> I wrote:
> >> I'd like to have a tag to cover libtemplate-perl, python-cheetah,
> >> smarty, and velocity together. Perhaps devel::template?
> 
> On 9/19/05, Erich Schubert <erich.schubert at gmail.com> wrote:
> > I think we had a webdevelopment tag for these. The term "templating"
> > is not that clearly defined. Is a "language" which has iterator
> > constructs and conditionals not a full programming language? When is
> > it a template engine?
> 
> Template engines combine template and data model to produce output.
> This usually involves replacing placeholders in template with provided data.
> Also, unlike usual programs, templates are copied to output by default.

Yes, but there is no pacakge consisting of "templates"...

> I'd say above paragraph is rather well-defined.
> 
> Templates can be used to produce HTML, LaTeX, plain text, or other things.
> They are usually associated with web development, but there's no reason
> why they can't be used for other purposes.

I agree.

> > Is libhtml-mason-perl a templating engine? Is zope one? Is PHP one? Is
> > XSLT a templating system?
> 
> Mason is. Zope is a lot more, but Zope TAL certainly is. PHP can be used
> as one, but usually isn't. XSLT is... XSLT.
> 
> Seo Sanghyeon
> 

I disagree that Mason is a templating system. It is not. It's a whole
web application framework, which has much more to do with OOP for web
sites than templating. It's about caching page components, generation
of components etc. You might even want to use a different template
engine - e.g. HTML::Template inside of mason.

So would you tag PHP as templating system?

That is basically the point I want to make:
Defining what a templating system is, also means to draw a line (which
must be clear and useful for the end user) on what is not a templating
system.
As long as some people say something is a templating system and others
say "hey, come on, this is just another programming language,
otherwise make 'bash' a templating system, too!" the tag is badly
defined.
And PHP gives us serious headaches here.
What e.g. makes PHP better suited for templates than bash?
---
echo <<EOF
Subject: This is an email template
From: whoever at somehere.universe
To: $email

Hello $name,
I'm doing a stupid example
EOF
---
Which clearly would make 'bash' a templating engine, wouldn't it?

best regards,
Erich Schubert
--
    erich@(mucl.de|debian.org)      --      GPG Key ID: 4B3A135C    (o_
  To understand recursion you first need to understand recursion.   //\
  Wo befreundete Wege zusammenlaufen, da sieht die ganze Welt für   V_/_
        eine Stunde wie eine Heimat aus. --- Herrmann Hesse



More information about the Debtags-devel mailing list