I'm trying to build an application based on codeplex prism unity. And I have a hard time understanding how to achieve a really loosely coupled application.
In my understanding a module ought to be a completely independent working part of an application. In other words an applicationen inside another one. Means there are no references from one developing project to another.
But how does the exchange between modules happen? I'm using the eventaggregator, which works fine, but I need a messagetype (the class that provides the data) in both the sending and the receiving module. If I want to work without referencing, I'm forced to duplicate the messagetype. I could use a third module, which provides the messagetype for both modules, but how can I use the messagetype without referencing the third module?
When I try to register the messagetype within the unity container, I still get a compiler error. It's obvious to me, because module a doesn't know the third module at compile time, neither does module b.
Am I experiencing the limitations of composite applications or do I miss a piece of the puzzle?
Thanks in advance for your help!