Using ZF Tool to Create a Modular Zend Framework Application
Apr 29
Introduction
This is just a quick guide on creating a modular application structure in the Zend Framework using the Zend Framework Tool (more or less).
The Process
First move to your directory.
cd /var/www/
Now create the project
zf create project MyApp cd MyApp
Now that we have a functioning app. The next step is to turn it into a modular application. First we remove the controller and view directories then we create our first module with its controller, action, and view.
rm -rf application/controllers/ rm -rf application/views/ rm -rf application/models/ zf create module default zf create controller Index 1 default
Now that we have our default controller with a index controller and index view, were almost there. The system isn’t yet setup to use the modules so the last thing we need to do is edit the application configuration file. In the application config you will make the following change
; Remove this line from your current application.ini resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" ; Add this line in its place resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
Conclusion
This is the process that I currently use. I’m sure there is a much easier solution to this but I haven’t found it. Please let me know in comments if you know of a better way.

Great introduction. Thanks!
Straightforward and it works – in contrast to examples from the foggy zend documentation. Thanks for posting
Thanks Christian, great works, is exactly and very simply and easy.
Great!!!