lua-users home
lua-l archive

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


.lp is cool but it's not a framework. it's like going back to the good ol' pre-framework PHP scripting style days (which i remember to be hell for maintainance)
 
I like Rails because
- their methods are easy to understand
- Love their activerecord migration feature
- Love the _javascript_ code generator (it would be lovely to generate js scripts with lua, like google's GWT)
 
Another reason i didn't just choose Rails is because i don't like the way they document their API. It is really terrible for beginners.
 
As much as PHP is maligned as a terrible language, the reason it caught on so much is it's dead simple to understand API docs. Lua's docs is not bad either. And the Rails framework structure. Oh my god. So many directories. Come on. Surely, we can simplify it?
 
As for PHP frameworks, the only one that caught my eye is SolarPHP.
I like their Solar:factory('class_name') method.
 
Instead of
require 'class_name';
$obj = new $class_name
 
you just do $obj = Solar:factory('class_name');
 
The factory method automatically load the required file for the class name and return you an instance of the object.
 
Another feature i love about them is their HTML forms class, which is very much similar to Pear's HTML QuickForms.
 
It's dead simple to use.
eg.
$form = array(
 'userpw' = array('name' => 'username', type='password', 'valid' => true, 'warnings' => 'You must enter a password')
);
 
Then the forms class with generate the HTML code for the form and attach labels, legends, id, class to the form so you can style the form totally through CSS stylesheets. Now, that's true separation of presentation and code. Absolutely no need for inline styling for forms.
 
I've seen the Python frameworks. Django, turbogears, pylons. None of them seriously impress me. Grails, a Groovy copy of rails, is not bad.
 
I see that CGIlua is copying Ruby's lang? with the <% %> tags and the CGILua:puts() method. So i see that Orb should be similar to Rails?
 
pity my lua knowledge is limited. else, i would attempt at porting a mix of rails/solar php to lua.
 
On 8/19/06, lua-request@bazar2.conectiva.com.br < lua-request@bazar2.conectiva.com.br> wrote:
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!

--
Javier