Why not incorporate one of the existing admin bundles?

203 views
Skip to first unread message

keymaster

unread,
Apr 26, 2012, 5:22:36 AM4/26/12
to syliu...@googlegroups.com

In each of your bundles, you are replicating lots of similiar logic.

List, Edit, View, Delete actions and associated form types and templates;
filtering, sorting, pagination, etc.
menus

Would it make sense to integrate, and extend where necessary (as in your nested category backend), one of the existing admin bundles?

I've tried Sonata and Cedric Lombardot's Admingenerator.  My personal opinion is the latter is a better value for the effort. The code generation is produced in a cache so it doesn't override your custom changes (you extend the cached classes), and the generated code is super simple to understand and extend. Sonata has more features, but go figure how to extend it...


keymaster

unread,
Apr 26, 2012, 5:37:38 AM4/26/12
to syliu...@googlegroups.com

LyraAdmin seems to be coming along nicely and steadily as well. It has it's own approach. It's not based on code generation, instead you extend base classes and templates.Also runs off yml config file. Haven't tried it yet, so cannot comment further.

https://github.com/mgiagnoni/LyraAdminBundle/blob/master/Resources/doc/index.rst

Paweł Jędrzejewski

unread,
Apr 30, 2012, 10:56:57 AM4/30/12
to syliu...@googlegroups.com
Hey!

I'll have a look at those admin generators but at the moment integrating such thing is a no-go, because there is no admin generator/bundle/whatever that will fit all needs.
It will always be limited somehow and to extend it, you would need to hack it. Right now you can do whatever you want. But yeah, I see that sometimes it looks like duplicating the same logic, I will think if we can do it better way but still, too much abstraction/automation and you're stuck with customization to fit the exact needs. 
Reply all
Reply to author
Forward
0 new messages