Zend framework is pretty fast growing, we all agree and we all had been surprised while trying out the modular structure of Zend Framework, if to be concrete the bootstraping of the modules - all the bootstrap files of the modules are executed in the beginning no matter if we are using/accessing that module or not. As far as I remember the module bootstrap gets executed like plugin to the main Bootstrap. But on the other hand I find implementation of ZF very sophisticated and written with great respect to design patterns.
So before going and stumbling the Module Lazy Load/Bootstrap, I would like to have a objective thought on the bootstrapping aspect
-- So does the initial module bootstraping in ZF have a solid logic behind it or should it be changed to something like lazy/on demand bootstrapping?
I know question is pretty implicit , so let me give some more
for instance in a modular app we want to have a separate initial configurations for each module(like a separate layout) and the bootstrap is a paradigm for a "place to do initial configurations ",right? But if we place initialization/configurations in the way Zend Documentation says, then our application loads all the initializations that have been set up in every module bootstrap class for every request.(I'm just a guest and still when i request something admin bootstrap will be executed, though in the background) - it is pretty much trashing the system.
as far as I see there are two ways the idea can flow
- to have in the module bootstrap things that are only complementary to the whole system (pretty much don't see what it can be)
- To change the way modules bootstrapped with a help Action plugin or extending the Bootstrap class that deals with boostrapping the madule bootstraps
And my initial question was is there any logic to follow the first option, and would the 2nd option will be a good choice?