How do web templates separate content and logic?

Mike termim at gmail.com
Mon Jun 30 15:16:18 EDT 2008


On Jun 30, 1:41 pm, George Sakkis <george.sak... at gmail.com> wrote:
>
> Because _typically_ a web template consists of mostly HTML, with
> relatively little presentational logic and (ideally) no business
> logic. Now, if all one wants to do is a quick and dirty way to, say,
> view a log file in the browser, a separate template is probably an

The keyword here is "(ideally)". These _typical_ cases are pretty much
restricted to a helloworld-like examples or to a pure men log file
browser ;). Real application templates quickly became complicated and
require full blown scripting engine. Zope/Plone/Trac templates are
good examples of this.

> ... It's a matter of
> relative frequencies which language is the embedded one.
>

Take a look at, say, http://trac.edgewall.org/browser/trunk/trac/templates
It is not obvious what relative frequency is higher. For other systems
the
situation is similar I believe.

So there should be something else that justifies this multitude of
template
systems. Unfortunately (for me :-) I couldn't find reasonable enough
explanation for this phenomena, except for the fact that it is a fun
to
write template engines ;). Probably not this time either.

Regards,
Mikhail

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++
Q: What one would get after crossing two snakes and two hedgehogs?
A: Two meters of a barbed wire.



More information about the Python-list mailing list