lua-users home
lua-l archive

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

> From: [mailto:lua-
>] On Behalf Of Javier Guerra
> Sent: Friday, August 18, 2006 4:49 PM
> To: Lua list
> Subject: Re: Lua MVC web framework?
> On Friday 18 August 2006 3:12 pm, grab mail wrote:
> > I know Orb is in the workings. How much longer must we wait before we
> can
> > see an alpha release?
> >
> > I am a PHP refugee and is considering using Lua to write my next web
> app.
> > (i find its syntax much readable than Ruby)
> if you used PHP as-is, CGILua's .lp pages will feel just like that for
> you.
> if you liked a particular PHP framework library, maybe you could tell us
> what
> was good and bad about it, and use that experience to create new ones!

I have a design for a table-driven controller ready to be translated :-)

First, a few things:

1) MVC does not require OO.  Have done a clean table-driven MVC webapp. MVC
simply means Model(data and application Model) free from Controller free from
View.  Was done with JSP scriptlets (PHP-style,  nothing JSP about it) and
Freemarker for the view.  Nothing OO about it.   The validation code was
written in Jython because that language could handle something complex out of
the box without imposing a veneer of objects over an inherently weak OO-bound

2) The current crop of MVC frameworks,  the state of the art,  follows the
design of Ruby On Rails,  in which you maintain a directory full of
individual controllers.  There is no high level table that will tell you,
the maintenance programmer, the pageflow for the application-what it is doing
and when it is doing it.  The mailing list archives for the PHP Zend
framework reveal that they do address this issue,  but recommend you divide
your controller up into meaningful subdirectories.  This is not enough,  and
it is expansion into more files and directories when we should be compressing
into fewer files and directories.

3) There's still room for innovation.  There's need for an extract, translate
and load (ETL) function to send Active Record to different databases (it's
really sending a translated record to a remote queue),  that could easily be
done by using a table populated with simple and complex functions for each
field to be translated.  Populating a table with functions is easy in Lua,
unheard of in Java...  Haven't seen support for this in other frameworks.

4) Good frameworks have support for page and page element caching.  This is
where RoR and Symfony stand out from the rest,  their caching is pretty
configurable.  Of course you could easily go totally custom with
Pear::Cache_Lite,  Zend framework cache is pretty good,  these leverage PHP's
inherent output buffering capability.

5) If there's no template processor yet for Lua,  probably the cross-language
templater Clearsilver would be the fastest way to go.

Would like to translate to Lua in my spare time :-)