Hi

Same Ideas importing from life…
Each module have their own config file, template/theme/, functions, class,libs, etc
full cell subsystem;
this work as an independent system, extending the framework libs
for example module messages:
modules/messages
--------/messages/Admin/ [this a sub-module with admin features]
--------/messages/lang/
--------/messages/block/ [code for display in specific layout]
--------/messages/views/
--------/messages/functions/
--------/messages/models/
--------/messages/index.php
--------/messages/SameController.php
--------/messages/postController.php
--------/messages/ReadController.php
--------/messages/version.php
<?
//version.php
same code:
$module[version]='1.2';
$module[autor]='Max Megabr';
$module[module_name]='Messages';
$module[module_dir]='messages';
$module[suported_actions]=array('list','add','delete','view','listarchive');
$module[has_admin]='1';
$module[block][1]='messages_last';
$module[block][2]='messages_top';
$module[menu][main]='/modules/index.php';
$module[menu][main]='/modules/index.php';
$module[menu][sub][1]='/modules/index.php?m=messages/list';
$module[menu][sub][2]='/modules/index.php?m=messages/listarchive';
//or another way
$module= new module extend mainYiiModule();
$module->version='1.2';
$module->autor='Max Megabr';
$module->module_name='Messages';
$module->module_dir='messages';
$module->has_admin='1';
$module->suporte_actions=array('list','add','delete','view');
?>
the index.php here is the sub-router; receiving params from urls coming from main index.php router
before anyone acess this aplication on
modules/messages/index.php
the main framework verify the global user permissions to the routed module/action
the module name is unique identifier in the framework
URL solutions
http://localhost/index.php?r=here STANDART aplication
http://localhost/index.php?r=user/list
http://localhost/index.php?m=here MODULE BASED aplication
http://localhost/index.php?m=messages/show
r= normal route
m= module route
also the framework can be an module system container of specific classes for modules… support:
/modules/system/
well…