OK, I see your point.
You see the ModuleMediator as a gateway between the modules.
The mediator is so dedicated to the view managment in robotlegs, that I was a little disturbed to use it to redirect all the inter-module communications.
I was seeing the other options :
- using a startupCommand in which the moduleCommandMap is injected
- overriding the setModuleDispatcher() method to store in the module's context a reference of the ModuleCommandMap instance
as good design.
In fact, the context act as a configuration for the whole inner module wirings.
I was wondering if the ModuleMediator, like you use it, didn't duplicate this behavior.
But I completly agree with your module agnostic point.
Thank you for all, that make great sense !
Eric Priou (not verified) | Mar 22nd, 2010 at 11:08 pm
OK, I see your point.
You see the ModuleMediator as a gateway between the modules.
The mediator is so dedicated to the view managment in robotlegs, that I was a little disturbed to use it to redirect all the inter-module communications.
I was seeing the other options :
- using a startupCommand in which the moduleCommandMap is injected
- overriding the setModuleDispatcher() method to store in the module's context a reference of the ModuleCommandMap instance
as good design.
In fact, the context act as a configuration for the whole inner module wirings.
I was wondering if the ModuleMediator, like you use it, didn't duplicate this behavior.
But I completly agree with your module agnostic point.
Thank you for all, that make great sense !