An Intro to Composite Applications – Eric Mork
Prism can be thought of as a set of libraries that help Silverlight applications be scalable and testable. It has a number of features (modularity, view regions and commanding) that help with this. This guide shows you how to get started writing a Prism application in Silverlight. It shows how to use the bootstrappers, modules, catalogs, regions and commanding.
How Commanding Works in Prism and MVVM– Eric Mork
Prism Commanding allows designers/develops to specify, in XAML, events that fire back into the View Model/Presenter. Imagine this: the user hovers a mouse over a Silverlight control. Commanding allows that action to be bound to a method (more specifically, a delegate) in the ViewModel. The View Model then handles that action. This Commanding support overcomes a deficiency (lack of ICommand implementation) in Silverlight that makes proper MVVM implementation difficult. If you’re using MVVM, Commanding is a must. That can take the form of a home-grown solution, Prism or any of a number of other libraries: Caliburn, Silverlight.FX, etc. In Prism Commanding, the Commands are implemented as attached properties. This video shows how to use the existing command (button click), handle command parameters, use the CanExecute functionality, and create new commands.
- Eventing in Prism – Loosely Coupled Talking – Eric MorkPrism allows us to have modular and loosely coupled applications, but how do these loosely coupled pieces communicate? That’s where Eventing and the EventAggregator come in: they provide communication channels. A way that the separate pieces of the application can safely talk back and forth. Eventing also has extra goodies (thread preference, weak references) that are built on the lessons learned from past technologies (like CAB). All around, it’s a great helper for any Silverlight/Prism (or WPF) application.
Modularity allows applications to be broken down into discrete pieces. This allows for easier testing, better maintainability and the ability to distribute an application across multiple teams. This video explores the modularity support in Prism. The first part of the video covers Unity and Unit Testing. Inversion of Control using Dependency Injection and Service Location are both covered. The second part of the video details modules and how they’re loaded by the Module Catalog.
Regions in Prism Video – Eric Mork
Regions in Prism are kind of like Master Pages. They allow us to have master and sub-views. If you’re interested in composing views separately and then bringing them together in the running application, Regions are for you. As with all of the things in Prism, Regions are a part of the buffet. You can use them or not at your discretion.
In this 4 part series, Bob Brumfield and Erwin van der Valk from patterns and practices shows you how to build a modular application using the recently released Composite Application Guidance for WPF and Silverlight – February 2009 (also known as Prism V2). Source code.
In this screencast, you will see how to divide an application into modular pieces and how to recombine them again in a shell.
This webcast demonstrates how to create placeholders for views and how to load views into them.
This webcast demonstrates how to create a view using the Model – View – ViewModel pattern, and how to create and inject Services into your classes by using the Unity Dependency Injection Container.
This webcast demonstrates how to communicate between the different modules.
Click the links above to watch the screencast.
Also, from Prism Codeplex – Learn about Prism through videos and blogs Learn Prism