When to use Modules in Zend Framework?

UtlraQita

New Member
When setting up new ZF Projects i normaly have this directory structure:
  • application
    • modulesdefaultcontroller
    • forms
    • view
    • models
  • admin
    • controller
    • forms
    • view
    • models
[*]language[*]shared
  • models
[*]library[*]publicI 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.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. His setup works and isnt wrong, but i never saw such an approach, its seems unneeded complicated.So to come to an end: [*]When would you use Modules and when you would stick toControllers?[*]Whats your rule to decide Module or not Module ?[*]What are the cons AND pros of my colleague's setup in your pointof view?[*]What are the cons AND pros of my setup in your point of view?TIARufinusEDIT: see http://mwop.net/blog/2012-04-30-why-modules.html for info on the redesigned modules in ZF2.0
 
Back
Top