AgileTillIDie
AgileTillIDie

Reputation: 469

ZF2 module best practices

What is the accepted best practice with the Zend Framework's new module system in version 2? Is it the intention that I create one module per controller for my application, or am I supposed to use the modules to group related controllers and their models together in some way?

Upvotes: 2

Views: 1322

Answers (1)

Sam
Sam

Reputation: 16445

See Rob Allens introduction into Modules or Matthews introduction into Modules.

In Short: A module is simply a bunch of Classes that perform one specific task. I.E.: A Guestbook could be one Module. GuestbookMailing could be another module (but doesn't need to be). You can have multiple Controllers, Models, Views in your Module. But it should be all tied to one part of your whole application.

Upvotes: 4

Related Questions