Page 1 of 1

Best framework for CRUD forms?

Posted: Tue Aug 24, 2010 7:54 pm
by Mark^Bastard
Hello all.

I used to be much more of a freelance PHP developer. I got to the point where I could write big complex websites in the more traditional PHP way, with header and footer include files etc. After I got to the point where I had a lot of experience I started to be concerned with wanting to write better code that I could be proud of, and naturally this was around the time the MVC frameworks started appearing on the scene. At the same time I stopped developing due to my day job but still messed around with a few frame works.

I found Cake to be too magic.
I put a lot of time into Zend Framework but realised that it won't actually save me any time, it may even take more time.
I've recently looked at Code Ignitor and it looks up my ally, a nice in between that doesn't try to be too perfect.

One thing though that I definitely want in a framework is very easy form handling. By this I mean the ability to set validation rules for forms in configuration files, and then have the framework check the validation and display the errors to a user.

This seems to be handled well by most frameworks, except I want this same configuration file to automatically create validtion rules client side using JavaScript so that a form is validated using JavaScript first, before actually submitting to the server. Thus the validation at the server becomes secondary and typically only used in the case of JavaScript being turned off or someone deliberately trying to exploit the website.

So in a user form you may have some validation rules that say a username must be between 5 and 16 characters and only contains A-Z, a-z and 0-9, and then a class should generate these rules in JavaScript and assign them to your form, and then at the backend these rules are created in php as well.

Seems a pretty basic requirement to me. My main goal is making secure forms very quickly to speed up development, as I find this the most tedious task.