I have an app in Prado 2, with several modules. Each module contains the views (tpl), "controllers" (php pages) and model (php module file) of one logical unit of the system (let's say, a Blog, or a Chat).
How can be this mimicked with Yii? I was thinking on using controllerMap, but as I understand the Yii controller is the equivalent to the page in P2…
Actually controller in Yii is equivalent to a collection of pages in Prado.
Usually, a controller is responsible for CRUD operations of a database table. So it is more like the module concept in Prado.
You do not have to put all controller action logic in the single controller class file. Instead, you can create individual controller action classes to accomplish CRUD operations.
As a result, depending on how many database tables you will be managing, your system will be end up with several to dozens of controller classes together with their action classes organized in subdirectories.
Now another question: what if I had master-detail tables, and I had one page for master, one (or multiple) page for detail, and the associated new/edit page(s)? Do I need to have one controller for the master and one for the detail, with the associated action classes?
Thanks for answering these (rather basic) questions
This is possible, but you have to override CWebApplication::createController and extend CController. Actually, once you try, you will see this is bringing more trouble than convenience.