Besides the obvious ‘admin’ and ‘blog’ use cases for a module structure in Zend Framework are there any reasons or guidelines to use Modules? I feel drawn to use modules, but I’m not sure how I would split my web app up into modules.
Can you suggestion some instances where using modules would be beneficial?
Modules are good when you want to reuse them across multiple applications, or when a piece of the application is large enough that it warrants separation into its own chunk. Rather than having a bunch of unrelated controllers in one directory, the module allows you to split up the MVCs into related chunks.
We use modules all the time; our clients frequently pick and choose between the available modules to package an application. We also introduced module dependencies, so that modules may rely on each other.
As a general rule, when our applications have a high level subfolder, unless they have only a couple pages, they are modules. For example, About would only be a controller and a view within the application, but forum might be its own module.