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.
Preview:
RSS Feed
Twitter
Posted in 
Hi ,
I would love to see it in action . Let me know if you can send something
This looks cool. Looking forward to the release.
Hi Elvis,
sounds very interesting! I really would love to have a look at the package. Could you please be as kind as to send me the framework?
Bye
Christian
sorry for the late reply.. I had no a valid spam plugin for my new blog and i’ve just spotted those non-spam comments
I need to remove some hardcoding and dependency injection, as well as adding more comments (problems due to time constraints mainly). At the current state are very useful for me but until I don’t make them usable from other developers I’m afraid they will be they cannot be easily used. I should be able to put a public svn and put a little documentation and examples in a couple of months. I actually started using zend some months ago and I prefer to read all the documentation to avoid writing non-zend code or using not the best approach for some things.
Thanks for the encouragement guys
now I’m more motivated to improve them
Elvis
Would be great if you could send me an email as soon as release the first version of your project.
Bye,
Christian
Hi Elvis, would like to try and collaborate with development.
César Medeiros
Hey Elvis,
This looks like a really interesting project. Please share the code if possible.
Looking forward to the release. Please keep us updated.
Amit
Hi Elvis,
I’d like to see your implementation; we are planning to implement a scaffolding CRUD with Zend Framework.
I really would love to have a look at the package. Could you please be as kind as to send me the framework?
Thank a lot.
Renato Salvatori
made beta version, see page of this blog
http://www.phpntips.com/crud/
with public svn, demo app online,
no documentation and unit testing so far
First, congratulation for this CRUD !
.
Unfortunately, i work with doctrine2 models so i can’t use your crud
It will be nice if you decide to apply your CRUD width doctrine2.
I hope one day… who knows…
I’ll might make the doctrine2 version next time I’ll use them for a zf app with doctrine. There is an abstract class and interface to access the db model so by implementing those methods it should not take long. Not an obvious process I’m afraid, when developing I sometimes had to break the interface (have to refactor and make unit testing).
Hi Elvis,
Its really nice, congratulation