background preloader

MVVM &AE

Facebook Twitter

How to: Subscribe and Unsubscribe to Events. The Composite Application Library provides an event mechanism that enables communications between loosely coupled components in the application.

How to: Subscribe and Unsubscribe to Events

This mechanism, based on the event aggregator service, allows publishers and subscribers to communicate through events and still do not have a direct reference to each other. This topic describes how to subscribe and unsubscribe to an event that can be consumed in a loosely coupled way. For more information about events, see the Event Aggregator technical concept. This topic assumes that you have a solution built using the Composite Application Library that has a module and a typed event created.

For information about how to do this, see the following topics: How to: Create a Solution Using the Composite Application Library. How to: Create and Publish Events. The Composite Application Library provides an event mechanism that enables communications between loosely coupled components in the application.

How to: Create and Publish Events

This mechanism, based on the event aggregator service, allows publishers and subscribers to communicate through events and still do not have a direct reference to each other. This topic describes how to create and publish an event that can be consumed in a loosely coupled way. For more information about events, see Event Aggregator Technical Concept. This topic assumes that you already have a solution based on the Composite Application Library with a module. For information about how to do this, see the following topics: How to: Create a Solution Using the Composite Application Library. Events created with the Composite Application Library are typed events. Model-View-ViewModel (MVVM) Explained. Download sample - 40.3 KB Introduction The purpose of this post is to provide an introduction to the Model-View-ViewModel (MVVM) pattern.

Model-View-ViewModel (MVVM) Explained

While I've participated in lots of discussions online about MVVM, it occurred to me that beginners who are learning the pattern have very little to go on and a lot of conflicting resources to wade through in order to try to implement it in their own code. I am not trying to introduce dogma, but wanted to pull together key concepts in a single post to make it easy and straightforward to understand the value of the pattern and how it can be implemented. MVVM is really far simpler than people make it out to be. Background Why should you, as a developer, even care about the Model-View-ViewModel pattern?

Do you need to share a project with a designer, and have the flexibility for design work and development work to happen near-simultaneously? I've been amazed at some conversations I've read online. 5: Implementing the MVVM Pattern. The Model-View-ViewModel (MVVM) pattern helps you to cleanly separate the business and presentation logic of your application from its user interface (UI).

5: Implementing the MVVM Pattern

Maintaining a clean separation between application logic and UI helps to address numerous development and design issues and can make your application much easier to test, maintain, and evolve. It can also greatly improve code re-use opportunities and allows developers and UI designers to more easily collaborate when developing their respective parts of the application. Using the MVVM pattern, the UI of the application and the underlying presentation and business logic is separated into three separate classes: the view, which encapsulates the UI and UI logic; the view model, which encapsulates presentation logic and state; and the model, which encapsulates the application's business logic and data. This chapter provides an overview of the MVVM pattern and describes how to implement its fundamental characteristics. The View Class. Model-View-ViewModel (MVVM) Explained. 5: Implementing the MVVM Pattern.