08-06-2009, 07:48 PM
|
#1 (permalink)
|
|
The Contributor
Join Date: Mar 2009
Location: US
Posts: 76
Thanks: 0
|
Framework Auto Admin - Django Style
Posted this somewhere else no feedback...
Basically developing a full fledged CRUD admin interface, that is basically much of the same that django does, only written in PHP.
Currently the theory I have come up with is to have the Admin Core Singleton which holds the registry for Models ( which are added in the same fashion as Django Models) within each Model will be a registry of the fields, the configuration for fields, model configuration. There will be a single method for initializing the Builder which will analyze the Models in the registry, add the routes, do permissions etc etc..
The admin will be handled through one class(controller) which will feature a method for each action that can be done (view, add, edit, delete). The class would dynamically build the administration view based on a defaults unless otherwise given.
Basically it would be
Load Modules -> Admin_Core -> Init Admin_Core -> Load Routes & Other -> Route to Admin -> Determain Model -> Construct View based on default and config given from model configuration
Other tid-bits such as form processing and generation, permission handling, action/error logging I have already built into the framework and would be easy to process given from the config given from a model.
The first 4 process would have to take place before the page is routed to within the framework ....
Anyone have some suggestions on improving or optimizing?
|
|
|
|