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

Gaspar Chilingarov nm@REDACTED
Thu Jun 15 07:08:56 CEST 2006


ke han wrote:

[skip]

> according to StringTemplate syntax, your example can be written more
> clearly, IMO:
> 
> <table>
> $people:row()$
> </table>
> 
> where row() is defined as:
> <tr><rd width=20>$attr.name$</td></tr>
> 
> 
> - or -  if you feel like putting it together as one:
> 
> <table>
> $people: {
>     <tr><td width=20>$attr.name$</td></tr>
> }$
> </table>
> 
> I think if you read the pdf referred in this thread, you can see the
> rational for not using erlang as the template language but in favor of
> using erlang for all the behavior needed elsewhere such as the
> controllers, models, and renderers.  In other words, "if StringTemplate
> can't easily help you construct your view, then you shouldn't be coding
> that behavior in the view".
> 
> thanks, ke han
> 

I'm even against such templating language -- because I wish to pass some
simple template to designers and HTML coders and forget about it. Such
syntax will break visual editors.

In other hand -- I agree with Joe -- it's better to think about truly
dynamic AJAX applications, and framework for easy building them.


-- 
Gaspar Chilingarov

System Administrator,
Network security consulting

t +37493 419763 (mob)
i 63174784
e nm@REDACTED



More information about the erlang-questions mailing list