I’ve got a simple question for you: Which criteria is to be taken into account when creating a module for the application?
There are lots of Yii tutorials that explain how to create and use a module, like this one: http://www.yiiframework.com/doc/guide/1.1/en/basics.module , but I still don’t understand why would I create a module if I can develop the application with regular models, views and controllers. Please pardon my ignorance but I’m a newbie.
Could you please let me know with an example of a simple application (real life) in which you would rather add a module to it.
Modules are not a replacement for "real applications". Rather they are applications that do one specific task. A good example would be the an access control module . Access control is something you will need in many of your projects. If you put it into a module you can use that module in multiple places instead of writing a new access control for each and every project.
I think you will fall into one of 2 camps with modules:
You need to develop an ‘app within an app’ and the functionality really is completely separate.
You are going through your models folder and have to scroll 5 pages to find the one you need to update code in.
Modules are also one way to provide some organization in your overall app vs. making a subApp within. A CMS might have modules for backend and frontend functions although neither is technically an app unto itself.
Thank you for the response. That means that I could create an application by developing sets of modules and put in them together, which would allow me to reuse code and switch on/off modules according to requirements.