Default Modular Structure Structure for Zend Framework Application

I know the default directory structure for the modular Zend Framework applications that are in the manual.

/application
  /controllers
  /modules
    /admin
      /controllers
      /views
  /views
  /configs
/www
  index.php

But I wonder why I should do it this way. It really is sux to have a default module in / application and other modules in / application / modules /: moduleName. This is more a debatable question than a question of help.

What are the advantages and disadvantages of such a directory structure:

/application
  /modules
    /admin
      /controllers
      /views
    /default
      /controllers
      /views
  /configs
/www
  index.php

From my point of view, the only drawback is that it was not written this way by default / in manual mode. I do not see another. Am I missing something?

Moreover - I think this structure should be the default structure for any new ZF application. And I wonder why the Zend developers don't use it.

+3
5

.

Magento, , Zend , , , .

Zend .

+5

, , :

  • , , (.. ), .
  • ; .

, , .


, , , , , , , , , : ^^

, , , !

( , , , - "" , ...)

+4

, http://framework.zend.com/manual/en/zend.controller.modular.html

, ZF - , . - . Zend :

$front = Zend_Controller_Front::getInstance();
$front->addControllerDirectory('/path/to/application/controllers', 'default');
$front->addModuleDirectory('/path/to/application/modules');

, :

$front = Zend_Controller_Front::getInstance();
$front->addModuleDirectory('/path/to/application/modules');

, .

Zend - , addModuleDirectory(). , .

http://framework.zend.com/manual/en/project-structure.project.html , " //."

, Zend- , , . modules/. .

+4

. ... , Zen_Application Module_Bootstrapper, /application/module/name/forms ( , , ..) .

, , - : S

You can find the topic on the Zend forum here: http://forums.zend.com/viewtopic.php?f=69&t=2394&start=0

I hope that they will give an answer to this, otherwise I will publish it here.

+1
source

Here you can find the architecture you need: http://www.osebboy.com/blog/zend-framework-modules/

+1
source

Source: https://habr.com/ru/post/1717531/


All Articles