Module dependencies

Topics: Prism v4 - WPF 4
Mar 24, 2011 at 3:01 PM

Hello, dear patterns & practices team!

I'm a newcomer in Prism and I'm a bit puzzled about module dependencies feature, what is the common way to access to dependency module?

Thank you!

Mar 28, 2011 at 2:29 PM

Hi,

Prism provides you with different ways to manage modules and its dependencies. You can read the following links where these topics are covered:

For example, since you’re using WPF, if you’re specifying your modules in an App.config file, you could define the dependencies between them like this:

<modules>
<module assemblyFile="Modules/ModuleA.dll" moduleType="ModuleA.ModuleD, ModuleA" moduleName="ModuleA">
   <dependencies>
     <dependency moduleName="ModuleB"/>
   </dependencies>
</module>

 

Also, you should take into account that modules are intended to be discrete units of functionality that are not coupled to others; therefore, the communication between modules should be achieved in a loosely coupled manner, even if there is a dependency between them. You might find the following chapter useful for that purpose:

Chapter 9: Communicating Between Loosely Coupled Components

I hope you find this information useful.

Thanks,

Miguel Bronzovic
http://blogs.southworks.net/mbronzovic