Note that there are some explanatory texts on larger screens.

plurals
  1. POWhen to use Modules in Zend Framework?
    primarykey
    data
    text
    <p>When setting up new ZF Projects i normaly have this directory structure:</p> <ul> <li>application <ul> <li>modules <ul> <li>default <ul> <li>controller</li> <li>forms</li> <li>view</li> <li>models</li> </ul></li> <li>admin <ul> <li>controller</li> <li>forms</li> <li>view</li> <li>models</li> </ul></li> </ul></li> <li>language</li> <li>shared <ul> <li>models</li> </ul></li> </ul></li> <li>library</li> <li>public</li> </ul> <p>I use only modules when e.g the layout is diffrent, or a diffrent database is used, or of course when its a very special case like a admin-backend or a forum/board. Then i have Controller for the different parts of the application. e.g JobController, ProductController and so on.</p> <p>A colleague of mine showed me his base layout. its nearly the same, but he uses a lot of modules. like Job-Module, Product-Module each of this modules mostly have 2 Controllers an IndexController and an AdminController. </p> <p>His setup works and isnt wrong, but i never saw such an approach, its seems unneeded complicated.</p> <p>So to come to an end: </p> <ol> <li><strong><em>When would you use Modules and when you would stick to Controllers?</em></strong></li> <li><strong><em>Whats your rule to decide Module or not Module ?</em></strong></li> <li><strong><em>What are the cons AND pros of my colleague's setup in your point of view?</em></strong></li> <li><strong><em>What are the cons AND pros of my setup in your point of view?</em></strong></li> </ol> <p>TIA</p> <p>Rufinus</p> <p><strong>EDIT</strong>: see <a href="http://mwop.net/blog/2012-04-30-why-modules.html" rel="noreferrer">http://mwop.net/blog/2012-04-30-why-modules.html</a> for info on the redesigned modules in ZF2.0</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload