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:

http://svr225.stepx.com:3388/main

Is defined as:

http://dev.alt.textdrive.com/browser/HTTP/WikiLayout.txt

And rendered by:

http://dev.alt.textdrive.com/browser/HTTP/Template.lua#L156