Zend framework scaffolding CRUD libraries (for CMS and admin areas)

I’ve recently made extensible Zend Framework libraries for admin scaffolding [click to go to the page with details and download link], that is the automatic creation of CRUD forms. Differently from Symfony admin generator, Code Igniter and CakePHP, on ZF there is nothing similar already made 🙁
EDIT: Of course there are other frameworks to scaffold admin areas (Yii, ATK…) but in case you want to use Zend these libraries might be the best option to save time.

My libraries create forms by automatic reading of table structure (fields and type), with extra customization support. The code is strong object oriented, so extensible and re-usable. There are helpers to make dropdown and ajax components for foreign key table fields (in order to make forms for 1-N and N-N table relationships).

Before putting them on a public SVN and writing the documentation, I prefer to test more and improve them. However, I’ll send the code to whom may be already interested.

Details of the components

  • Controller (subclass of Zend_Controller_Action) with CRUD (create, read, update, delete) actions already made. When creating a CRUD form, it’s enough to extend that abstract  CRUD controller, then implement to methods that return the dependent form and model.
  • Models
  • Views (not strongly necessary as if not existing the controller prints the default content, but suggested)
  • Forms: automatically generated by reading metadata, with validation created depending on the field type (e.g: required values for not null values, integer validation when the field is INT, maxlengtt checks etc…), datepicker in case of timestamps etc….
    Forms extensible and customizable.
  • Order and filter form (for listing action) working with URL string (so order and filters are kept during CRUD actions)
  • Various interfaces for each component to keep the code OO and understand better errors.
  • Various Helpers
  • Other stuff …

When creating a new CRUD form, the components must be extended, then customised. I’ve used my libs to generate two different admin areas and it doesn’t take long by copying and pasting the components already made, anywayin the future I’ll probably think of a Zend_tool extension to generate them easier.


CRUD forms