After looking at the ViewManager, I'm even more now under the belief that
some EventManagers should be able to pull listeners from the application
config via the SM.

In the case of the ViewManager(s) these would no longer be needed. And more
beneficially, it seems that the event listeners that are currently being
created and registered in the ViewManager's onBootstrap method would then
only be created on demand - thats a lot less objects and pre-initialization
(or listener registrations), and in some cases for events that might not
even occur in that request.

I was originally thinking that there could just be an MvcEventManager which
would have a dependency on the SM. For example, if the MvcApplication had
an MvcEventManager then the bootstrap method would not need to attach any
listeners at all.

I previously created a gist of this here <https://gist.github.com/3422930>.
Pulling from the config, may only be suitable in particulars areas due to
the status of the autoloader, i.e it should work for MvcEvents but might
not work for all of the ModuleManager events (loadModules).



-- 
Greg

Reply via email to