Hey Jhon, On 23 October 2014 21:49, Jhon [via Zend Framework Community] < [email protected]> wrote:
> Hello Marco, thank you for the response. > Yes I have learned about the module system, and please do correct me if I > am wrong, in every module you can encapsulate a lot of functionality, but I > was thinking like this, almost every application will need a front module > to be visible to the user and a module for the admin, they will not > interact, every module has its own set of rules to achieve. > Modules are *NOT* sections of a website. Modules are reusable components that provide settings/services and in general functionality in a ZF2 application. A module may, in its general form, be anything. Separating modules by site sections is generally a mistake, as an "admin" and a "frontend" page may rely on the same service logic. > But is there a method to make a module/library to inject in both modules > different behaviour? ( example: I want at one point to add a simple > checkout, in admin I want to have a page where I can make some settings for > that checkout and in the front the checkout page. Is it not better and > quicker to make a package that will run on every zf2 project if they have > some required refferences ( admin and front ) with own views or view > blocks, own route instead of merging new config with old one, transfer the > controller, model and view you need in the new project? Or this is possible > in zf2 and I have to learn and read more? > You can just keep different configs for admin and frontend views. You don't need to "replace" URLs in your application to make them "admin" or "frontend" depending on a config setting: just use different URIs. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Zend-Framework-2-Vendor-package-question-tp4662340p4662343.html Sent from the Zend Framework mailing list archive at Nabble.com.
