autocontrollers

#1
[eluser]jparent[/eluser]
I've worked with CI for 2 years and I love it. I do my own Controller and my own model. They help me to reduce a lot of code. Now I want to advance one more step. I want to make a generic controller that takes information from an XML file and configure automatically 5 basic pages:

- list : list all elements of the table
- detail: list one elemnt of the table
- insert/update: built a form for insert/update the element
- delete: delete one or many elements of the table

Additionally the XML reflects which is the controller's main model and which are the submodels. The submodels are models like related products, related links, ..., and when you define this models it genererate methods for:

- add relationship
- update relationship
- delete relationship

That now is only an idea. I want to refine it. Because I think this xml config file will became to bigger and I think i need one "site.xml" for general config and one xml file foreach controller. I don't know.

I think to use a config file like CI:

Code:
$config['param'] = 'value';

but I don't like this format for deep tree configuration like:
Code:
$config['site']['controller']['models']['submodel']['relationships']['has_many'] = 'value';

I like you and me share Ideas to make easy the configuration of sites, and if I (or We) could, develop a general purpose CMS. The idea is that with the same appliation we will can develep a blog or a ecommerce or both with only enable the right modules and change only few things.

Thanks, everybody!


Messages In This Thread
autocontrollers - by El Forum - 06-09-2010, 05:51 AM
autocontrollers - by El Forum - 06-09-2010, 03:53 PM
autocontrollers - by El Forum - 06-10-2010, 05:03 AM
autocontrollers - by El Forum - 06-10-2010, 06:09 AM
autocontrollers - by El Forum - 06-11-2010, 06:12 AM
autocontrollers - by El Forum - 06-11-2010, 08:37 AM
autocontrollers - by El Forum - 06-15-2010, 04:40 AM
autocontrollers - by El Forum - 06-15-2010, 05:31 AM
autocontrollers - by El Forum - 06-16-2010, 01:17 AM
autocontrollers - by El Forum - 06-16-2010, 06:47 AM
autocontrollers - by El Forum - 06-17-2010, 01:19 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.