Your SlideShare is downloading. ×
  • Like
Mvvm pattern
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply


Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads


Total Views
On SlideShare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. MVVM Pattern
    Senior Software Engineer
    United Health Group
  • 2. Mahender Sarangam
    Having 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 :
  • 3. Why Do need Pattern
    Everything in code behind, is not a good idea
  • 4.
  • 5. Why Do need Pattern
    Basic Motivation of separation pattern
    Removing logic from Code behind
    Interchanging UI screens
    Create Unit test case foe logic and UI
    Developers and Designers can work parallel.
    Model never needs to be changed to support changes to the view
    No duplicated code to update views
    So what is MVVM ?
    Its variation of MVC pattern
    John Gossman from WPF team
    Resources from external assemblies
    Martin Fowler's Presentation Model (PM) pattern
  • 6.
  • 7. MVC & MVP Difference
  • 8.
  • 9. Diagram
    View Knows VIEW MODEL
    BUT VIEWMODEL does not know View
    View Model
  • 10. View
    • Represents the user interface that the user will see.
    • 11. Can be a user control or Data Template
    • 12. Keep the view as simple as possible.
    Uses Binding to “subscribe” to the ViewModel
    Interprets business data and state of ViewModel to the human
    Nothing but Presentation - XAML
    No or minimal code-behind
  • 13. View Model
    • An abstraction of View
    • 14. Connector between View and Model
    • 15. Keep View State, Value Conversion
    • 16. No strong or weak (via Interface) reference of View
    • 17. Make VM as testable as possible (e.g. no call to Singleton class)
    • 18. No Control related Stuff in VM
    Provides data to and from the View
    Responds to both the View and the Model
    Informs the View of changes in the data
    Reusable (at least much more than code behind a form)
  • 19. Model
    • Can be Data Model, DTO, POCO, auto-generated proxy of domain class and UI Model based on how you want to have the separation between Domain Service and Presentation Layer
    • 20. No reference to View Model
    Typical class that covers a database
    Could be a WCF Service and its client reference
  • 21. SupportingLibraires and Framework
    • WPF Team : MVVM Toolkit
    • 22. MS Pattern and Practice Team : Composite WPF (Prism)
    • 23. Josh Smith. "MVVM Foundation"
    • 24. Sacha Barber. "Cinch."
    • 25. Karl Shifflett. "Ocean"
    • 26. Laurent Bugnion. "MVVM Light Toolkit"
    • 27. Lester Lobo. "CoreMVVM"
    • 28. Rob Eisenberg. "Caliburn"
    • 29. William e Kempf. "Onyx"
    • 30. Peter O’Hanlon. "GoldLight"
    • 31. jbe. "WPF Application Framework (WAF)"
    • 32. Paul Stovel : MacroModels
  • Thank you