MVVM PatternMahenderSenior Software EngineerUnited Health Group
Mahender SarangamHaving 5 years of experience on .NET Technologies. Working as a Senior Software Engineer in United Health Group (UHG India Information Service Ltd.). Worked with Big Firms like Deloitte Consulting & Wipro Technology. Got Technical Acquaintance on Technologies like C#, ASP.NET,AJAX, LINQ, Silverlight, WPF,WCF ,SQL Server, Team Foundation Server(TFS) and SharePoint Technology. MCTS Certified in Web Technologies.Blog :  http://Msarangam.wordpress.com
Why Do need PatternEverything in code behind, is not a good idea
Why Do need PatternBasic Motivation of separation patternRemoving logic from Code behindInterchanging UI screensCreate Unit test case foe logic and UIDevelopers and Designers can work parallel.Model never needs to be changed to support changes to the viewNo duplicated code to update viewsSo what is MVVM ?Its variation of MVC patternJohn Gossman from WPF team Resources from external assembliesMartin Fowler's Presentation Model (PM) pattern
MVC & MVP Difference
DiagramView Knows VIEW MODELVIEW MODEL Knows MODELBUT VIEWMODEL does not know ViewViewView ModelModel
ViewRepresents the user interface that the user will see.
Can be a user control or Data Template
Keep the view as simple as possible.Uses Binding to “subscribe” to the ViewModelInterprets business data and state of ViewModel to the humanNothing but Presentation - XAMLNo or minimal code-behind
View ModelAn abstraction of View
Connector between View and Model

Mvvm pattern

  • 1.
    MVVM PatternMahenderSenior SoftwareEngineerUnited Health Group
  • 2.
    Mahender SarangamHaving 5years of experience on .NET Technologies. Working as a Senior Software Engineer in United Health Group (UHG India Information Service Ltd.). Worked with Big Firms like Deloitte Consulting & Wipro Technology. Got Technical Acquaintance on Technologies like C#, ASP.NET,AJAX, LINQ, Silverlight, WPF,WCF ,SQL Server, Team Foundation Server(TFS) and SharePoint Technology. MCTS Certified in Web Technologies.Blog : http://Msarangam.wordpress.com
  • 3.
    Why Do needPatternEverything in code behind, is not a good idea
  • 5.
    Why Do needPatternBasic Motivation of separation patternRemoving logic from Code behindInterchanging UI screensCreate Unit test case foe logic and UIDevelopers and Designers can work parallel.Model never needs to be changed to support changes to the viewNo duplicated code to update viewsSo what is MVVM ?Its variation of MVC patternJohn Gossman from WPF team Resources from external assembliesMartin Fowler's Presentation Model (PM) pattern
  • 7.
    MVC & MVPDifference
  • 9.
    DiagramView Knows VIEWMODELVIEW MODEL Knows MODELBUT VIEWMODEL does not know ViewViewView ModelModel
  • 10.
    ViewRepresents the userinterface that the user will see.
  • 11.
    Can be auser control or Data Template
  • 12.
    Keep the viewas simple as possible.Uses Binding to “subscribe” to the ViewModelInterprets business data and state of ViewModel to the humanNothing but Presentation - XAMLNo or minimal code-behind
  • 13.
  • 14.