Open Model From Another Model

Topics: Prism v4 - WPF 4
Dec 18, 2010 at 7:27 PM

Hi ALL

i have a question in prism concept please this is not issue.
i need to open model from another model with caring about the decoupling
i have solution but really i don't feel that is the best practice to do that
my solution is add service in the infrastructure to create instance from any needed module
if there is any one have another solution i will appreciate.

thanks
Massoud

Dec 20, 2010 at 4:05 PM

Hi Massoud,

 

Prism provides guidance for communication between loosely components (like your modules).

 

One way to fulfill this scenario is to use Shared Services. As documentation shows "...When the modules are loaded, modules add their services to the service locator. Typically, services are registered and retrieved from a service locator by common interface types. This allows modules to use services provided by other modules without requiring a static reference to the module. Service instances are shared across modules, so you can share data and pass messages between modules."

 

You can read more about Shared Services in Chapter 9: Communicating Between Loosely Coupled Components.

 

Also you might find useful the following links:

 

I hope you find this information handy

 

Thanks,

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