RFC: template engine [ was: Re: Implementing tables - advice wanted ]

Andrew Lentvorski bsder@REDACTED
Wed Jun 14 20:45:23 CEST 2006


Yariv Sadan wrote:
> I actually think there's something to learn from Drupal, the popular
> open source PHP CMS. Drupal's default template engine used to be
> xtemplate, which had a basic template language, but at a recent
> version, Drupal switched to PHP template by default. The reason, as I
> recall, is that the Drupal developers realized they already 'had' a
> template language: PHP.

I'm torn on this.

On one hand, I would like to have a template language that is executable 
and embeddable.  It makes my life easier.

On the other hand, this scales poorly.  Once the content writer is no 
longer a programmer, this is bad.  All the HTML content editing tools 
cope badly.  In addition, having executable code in the HTML is 
generally an MVC abstraction failure.

The Django folks generally make comments about this every time they give 
a presentation.  The content writers don't want to be programmers and 
hate having code in their HTML.  They don't even want to deal with 
Javascript; they just don't want to program.  Take a look at the Django 
templating to see how they limit the issue.

I don't think there is an ultimate solution.  This is one of those 
issues where different solutions work at different levels.  I personally 
despise PHP because my projects almost always wind up exceeding the 
level that it works comfortably.  Generally  my pain is not enough that 
I have to rip up the already done work but enough to hurt.

-a



More information about the erlang-questions mailing list