Quantcast
Channel: Inside Microsoft Technologies - Sunil Thotapalli
Viewing all articles
Browse latest Browse all 13

Model-View-View Model (MVVM)

$
0
0

The model-view-view model(MVVM) pattern is the most recent variation on MVC. It originated in 2005 with the Microsoft team developing the technology that would become the Windows Presentation Foundation (WPF) and Silverlight.

In the MVVM pattern, models and views have the same roles as they do in MVC. The difference is the MVVM concept of a view model, which is an abstract representation of a UI. The view model is typically a C# class that exposes both properties for the data to be displayed in the UI and operations on the data that can be invoked from the UI. Unlike an MVC controller, an MVVM view model has no notion that a view (or any specific UI technology) exists. An MVVM view uses the WPF/Silverlight binding feature to bidirectionally associate properties exposed by controls in the view (items in a drop-down menu, or the effect of clicking a button) with the properties exposed by the view model.

MVVM is closely associated with WPF bindings, and so it isn’t a pattern that is readily applied to other platforms.



Viewing all articles
Browse latest Browse all 13

Trending Articles