We have been doing extensive development using Silverlight, and have run into some barriers with the design of the application we are working on. Some of the issues we were able to mitigate with MVVM pattern. However, as the app has become more complex, dependencies have crept in between the viewmodels and the parent application.We are also running into trouble managing commands and events associated with the application - how do you have several components subscribe to the same event set without having to connect viewmodels together?

The application's Xap file has also grown to be fairly large, and it will be necessary to split the application up into separate chunks that are loaded only when required. Our current structure will not allow this.

Upon doing research into how to address these issues, I discovered the Prism framework from the Microsoft Patterns and Practices group. This appeared to be a great way to address a number of the issues.

Prism is a framework for composing applications from separate modules. It contains an approach for injecting components into others using the Unity framework (also a patterns and practices framework) to eliminate dependencies. It also has a very nice looking commanding approach implemented through an event aggregator publish/subscribe mechanism.

However, during reading through commentary on Prism, I also found the Managed Extendability Framework, from a different part of Microsoft which looked initially like it was a competing approach to solve similar issues.

Microsoft often does things like this (take the whole Linq/ Linq-SQL/Ado.net entity framework/Windows Communication foundation maze as an example...) in which they come out with several almost the same but not completely technology bits that overlap. Inevitably one of the approaches will be adopted at the expense of the other, which forces developers who adopted the wrong one to refactor to the winner.

 (More)