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

Yariv Sadan yarivvv@REDACTED
Thu Jun 15 01:19:50 CEST 2006


>
> Using the ehtml module in yfront (jungerl) you can write the
> above as:
>
> {ehtml, ehtml:table([[E#person.name] || E <-
> dict:get(people,Data)])}
>

Tobbe, this example make my previous code look like quite an eye sore
:) However, the advantage I still see with a template language is that
it makes it easy (i.e. no Erlang skills needed) to style and tweak the
table without digging into Erlang code.

OTOH, hacking a simple MVC framework into Yaws using Erlang as a
template language is probably 1-3 days of work, whereas implementing a
StringTemplate-like template engine is a bit harder. In addition, by
integrating this way with Yaws you get caching for free. Depending on
the maturity of the various efforts mentioned on this list, I might
try this temporary hack just for fun :)

Best,
Yariv



More information about the erlang-questions mailing list