[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [CGILua 5.0b2] Possible bug and change request
- From: Alex Sandro Queiroz e Silva <ventonegro@...>
- Date: Wed, 12 Jan 2005 10:32:07 -0300
Andre Carregal wrote:
You lost me here, could you please send some example of your intended
generation? Something like the examples presented below could help me
understanding your sequence needs.
My intended configuration would be like the scenario number 3
3) Lua Pages with calls to a library: URL -> page.lp <-> lib.lua -> results
A simple way to separate business and presentation logic
The Lua page runs the library at the very beginning. Sometimes the
library would decide to make a redirect, which is impossible with the
4) Lua Scripts with calls to a library that uses Lua Pages as subtemplates:
URL -> page.lua <-> lib.lua <-> template.lp -> results
That would be the basics for a MVC implementation (aka "model 2"), allowing
further separation of presentation and business logic.
MVC is always a good thing to aim for. But the current Lua pages
are more code-like than template-like. Take Smarty
(http://smarty.php.net/) for instance. If I want to output a table with
the name and telephone of a bunch of people I don't have to write a loop
in my PHP page if I am using Smarty, there is a tag that iterates over
Nevertheless this scenario seems to be the best with current
CGILua. I think I will change my code and give it a try.