I’m aware of default directory structure for Zend Framework modular applications that is in the manual.
/application
/controllers
/modules
/admin
/controllers
/views
/views
/configs
/www
index.php
But I’m wondering why should I do it this way. It really sux to have the default module in /application and other modules in /application/modules/:moduleName. This is more of a discussion question than a help-me question.
What are the pros and cons of having directory structure like this:
/application
/modules
/admin
/controllers
/views
/default
/controllers
/views
/configs
/www
index.php
From my point of view the only disadvantage is that it’s not written like this in default / in manual. I can’t see any other. Am I missing something?
Even more – I think that this structure should be default structure for any new ZF application. And I wonder why Zend developers doesn’t use it.
Actually your proposed directory structure is more than appropriate for large and complex applications.
Magento which is world’s best Open Source e-commerce solution today has been coded in Zend framework and uses similar directory layout as you propose, this way its very easy to extend and add new modules and manage old ones.
Again for simple apps and for learning Zend I would suggest everyone to stick to the default directory structure.