design of an outlook like application

Topics: Prism v4 - Silverlight 4
Jan 7, 2011 at 6:45 AM

Hi

I am creating an outlook like applications which have 3 modules

1. Contacts

2. Mail items

3. Appointments

On the left side I am going to display a tree view of the folder structure for each module

Only one folder is displayed at a given point of time.

Each module implements IFoldersView interface.

The tree view is part of a different module named “Infrastructure”.

What is a correct approach to call the active IFoldersView in order to get the folder structure

For the active module?

Should the active module register or replace(each time it become active) the concrete implementation of IFoldersView in the

unity container So the “Infrastructure” can call him?

Thanks in advance

Developer
Jan 7, 2011 at 1:59 PM

Hi,

If I understood your scenario correctly, you need to display information from your modules in a separate view (of a separate module). In order to achieve that, you could use any of the mechanisms for communication between loosely coupled components. For example, you could publish an event through the Event Aggregator with the information you need to display as the payload, and subscribe to that event from the component in your application that displays the folder structure.

I hope you find this helpful.

Guido Leandro Maliandi
http://blogs.southworks.net/gmaliandi