Tuesday 21 July 2009

Symfony Ajax Admin Doctrine Generator Plugin

We all know symfony's admin generator is a massive help when building CRUD functionality. With symfony 1.2 it's gotten even better but to a lot of people the art of generating code is perhaps just a learning step too far to master.

So when i started work on an app that was to be quite heavily CRUD centric but was to have to fit into a more dynamic interface i bit the bullet and got stuck into creating my own generator theme and generator classes.

The result is a plugin that will pump out doctrine admin modules that work over via ajax. The generator creates an external javascript class incorporating jquery, creates web symlinks and a view.yml to link it up. This keeps the generated module nice and clean.

Also included in the generator are arguments to incorporate taconite returns. For those in the know, this great jquery plugin allows the ajax return to denote a whole bunch of dom based events to happen. You can achieve some great effects and control them all from an action template.

The plugin can be found on the symfony plugin directory here. I'll be updating the plugin regularly and perhaps adding some extra themes. I'll follow this post with an in depth installation and use guide.