Currently, the module concept in Yii is very vague and is often mixed with the extension concept. In this proposal, I will try to clarify it and call for feedback on possible support for module.
Definition of Module: A module a self-contained sub-application consisting of one or several controllers together with their supporting files, such as views, models, libraries. Users can interact with a module through its controllers and actions.
Why Using Module: In a large system with tens or hundreds of controllers, it is more manageable to divide the application into modules, each being developed and maintained by a specific group of people. In an open system like an open source CMS, module serves as a way to add big chunks of functionalities. For example, there could be a forum module, a RBAC management module, etc.
How do we support module: Currently, I have the following in mind:
1). Each module is organized as a separate directory whose name is the module name
2). All modules are placed under the "/protected/modules" directory.
3). The directory layout of a module is similar to that of the "protected" directory with "controllers", "models", "views" and so on.
4). A module needs to be "installed" in order to be usable in the application. This could be done by declaring the module name in the "modules" property in the application configuration.
5). A module can have its own configuration file (??)
6). Accessing a controller in a module is like accessing the controller in a subdirectory of "controllers". The module name should be used as the prefix to the controller ID. For example, "index.php?r=forum.post/view", where "forum" refers to the "forum" module.
What else? Do we need a module object for each module? The module object is like the application object. It contains some global information shared by controllers under that module.
What about theming?