Zend Framework应用程序的默认模块化目录结构

Tom*_*far 3 directory zend-framework structure

我知道手册中Zend Framework模块化应用程序的默认目录结构.

/application
  /controllers
  /modules
    /admin
      /controllers
      /views
  /views
  /configs
/www
  index.php
Run Code Online (Sandbox Code Playgroud)

但我想知道我为什么要这样做.在/ application/ application/modules /:moduleName中的其他模块中使用默认模块真的很麻烦.这更像是一个讨论问题,而不是一个帮助我的问题.

具有如下目录结构的优点和缺点是什么:

/application
  /modules
    /admin
      /controllers
      /views
    /default
      /controllers
      /views
  /configs
/www
  index.php
Run Code Online (Sandbox Code Playgroud)

从我的观点来看,唯一的缺点是它在默认情况下/在手动中不是这样写的.我看不到任何其他的东西.我错过了什么吗?

更多 - 我认为这个结构应该是任何新ZF应用程序的默认结构.我想知道为什么Zend开发人员不使用它.

Sum*_*osh 5

实际上,您提出的目录结构非常适合大型和复杂的应用程序.

Magento是当今世界上最好的开源电子商务解决方案,已经在Zend框架中编码,并使用类似的目录布局,这样就很容易扩展和添加新模块并管理旧模块.

对于简单的应用程序和学习Zend,我建议大家坚持默认的目录结构.