[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Template storage mechanism?

On 4/7/07, Les Richardson <..hidden..> wrote:
> Those are the existing templates, which IMO aren't worth putting on
> the filesystem or in the db. I'm really hoping that once we start
> doing things properly, we will have a real template engine that will
> have a validation mechanism.

What's a template engine?

Software that lets you abstract/automate/generate/manage templates.
There are a number of different approaces and techniques.
TemplateToolkit is a popular one in  the Perl world, but I'm not very
familiar with it. I think the plan is to start using this in LSMB.


However, filesystems are highly optimized storage spaces. And templates
are complex relatively non-structured data.

xhtml and xml are both structured documents and can be parsed very
well by fairly mature parsing/validation engines.

This was the technique we used for the CMS for www.mcgill.ca (I was
the lead developer of that for aout 6 years), and it worked quite
well. In the last incantation, all use edited content as well as
documents and images were stored in the database. This greatly
simplified replication, as we had 5 machines running www.mcgill.ca
behind a load balancer, begin fed by a single data backend. The
frontend machines would cache data to the filesystem, and respond to
destroy comands when the cache expired (usually because an editor
modified the content).  In this scenario, the db backend would
eventually be the bottlneck, but then it could also be replicated with
Slony or some other mechanism.