Working with Prism 4 Part 3: Composite Command and Pub/Sub Events

added by KMillerr
1/26/2012 10:19:50 AM

1 Kicks, 203 Views

In this article, you will see how to define multiple modules that can communicate with each other through a combination of CompositeCommands and Prism events. CompositeCommands let you have handlers registered or unregistered in a loosely coupled fashion, and allows you to have multiple handlers (child commands) that will be used by the CompositeCommand. Prism events are for situations that are not necessarily an action->reaction kind of set up where enablement and disablement is needed. You simply define the event type with its strongly typed payload and then subscribe or publish by obtaining the event reference through the EventAggregator. Both of these mechanisms give you a really powerful combination for having loosely coupled communications between composite parts of your application.


1/26/2012 10:19:49 AM
Very in-depth article, thanks!
How do you like Prism compared to other options like Caliburn?