Looking at the example in David Sulc's book, I am bothered by the dependency of most modules on ContactManager, the Marionette.Application object. For example, contacts list controller, which is a component deep inside the application, is dependent on ContactManager. For most part, the dependency is due to the fact that ContactManager is an EventAggregator and events triggered by it need to be handled by most modules. In addition, the application is the holder of regions that the components need to render into. I generally see the Application object as a holder of components and that the components should not be dependent on the application itself. Am I thinking about this incorrectly?
To elaborate a bit more, I am generally ok with application components using infrastructure services such as event aggregation, persistance mechanishms etc. But it appears that in case of Marionette, the Application object is both a container of components as well as provider of infrastructure services. Do you think we could get a better (decoupled) architecture, if such infrastructure services would be taken out of it?
Again, I am a newbie to Marionette and trying to understand the best practices as fast as I can. Any help would be much appreciated.