lua-users home
lua-l archive

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

On May 12, 2011, at 8:40 PM, Romulo wrote:

>>> I think writing a web application templates in the way outlined in
>>> that example could be a viable option. What do you think?
>> Well, I personally think it's a baroque waste of time :))
> From my experience, this approach is bad. Your designers won't like
> it, your co-workers won't like it. Eventually you won't like it
> either. It is easier to just inject Lua into a html file than to write
> everything with Lua.

Totally agree. While the DSL part of the exercise is somewhat interesting, the practicality of the result is dubious at best.

I personally tend to use simple variable substitutions.

E.g. the following page:

Is defined as:

And rendered by: