From IT Skills
Jump to: navigation, search

MVVM[edit]

In 2005, John Gossman unveiled the Model-View-ViewModel (MVVM) pattern on his blog... The bindings between view and ViewModel are simple to construct because a ViewModel object is set as the DataContext of a view.... The ViewModel, never the View, performs all modifications made to the model data... If it were not for the support for commands in WPF, the MVVM pattern would be much less powerful... Views and unit tests are just two different types of ViewModel consumers... Lastly, for developers who work with visual designers, using MVVM makes it much easier to create a smooth designer/developer workflow. Since a view is just an arbitrary consumer of a ViewModel, it is easy to just rip one view out and drop in a new view to render a ViewModel. This simple step allows for rapid prototyping and evaluation of user interfaces made by the designers.... ViewModelBase is the root class in the hierarchy, which is why it implements the commonly used INotifyPropertyChanged interface... In order for WPF to know which property on the ViewModel object has changed, the PropertyChangedEventArgs class exposes a PropertyName property of type String... Model-View-ViewModel pattern allows you to create a strong separation between data, behavior,and presentation, making it easier to control the chaos that is software development.