1 / 12

Model View View-Model Introduction to the MVVM Pattern

Model View View-Model Introduction to the MVVM Pattern. Binu Bhasuran Microsoft MVP Visual C# Facebook http://facebook.com/codeno47 Blog http://proxdev.com/. Introduction. What is a MVVM? How it is important to software development?. The Evolution of Model-View-ViewModel.

blake-hunt
Download Presentation

Model View View-Model Introduction to the MVVM Pattern

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Model View View-ModelIntroduction to the MVVM Pattern Binu Bhasuran Microsoft MVP Visual C# Facebookhttp://facebook.com/codeno47 Blog http://proxdev.com/

  2. Introduction • What is a MVVM? • How it is important to software development?

  3. The Evolution of Model-View-ViewModel • The  Model-View-Presenter (MVP) pattern has enjoyed popularity on various UI programming platforms. • MVP is a variation of the Model-View-Controller pattern, which has been around for decades.

  4. The Evolution of Model-View-ViewModel • Martin Fowler published an article about a pattern named Presentation Model (PM). • John Gossman, currently one of the WPF and Silverlight Architects at Microsoft, unveiled the Model-View-ViewModel (MVVM) pattern 

  5. Why MVVM ? • The single most important aspect of WPF that makes MVVM a great pattern to use is the data binding infrastructure. • Entirely remove the need for writing code in a ViewModel that directly updates a view. • Can easily write code that tests • Visual designers, using MVVM makes it much easier to create a smooth designer/developer workflow.

  6. Relaying Command Logic • ICommandobjects exposed by the ViewModelexecute. • When a ViewModel exposes an instance property of type I­Command, the command object typically uses that ViewModel object to get its job done. • RelayCommand is a simplified variation of the DelegateCommand

  7. ViewModel Class Hierarchy • Implements the INotifyPropertyChangedinterface.

  8. ViewModel Class Hierarchy

  9. Class Responsibilities and Characteristics

  10. Demo

  11. Questions ?

  12. Thanks

More Related