3. What is MVVM?
• Splits the user interfaces in Model, View, View Model
• Model : data from database
• View: visual representation of the data, the part that the user interacts with
• View Model: the glue between the View and the Model. Controls the View
interaction with the application and wraps the data from Model for the View
4. What is MVVM?
Model not aware of the View Model and View Model not aware of the View.
7. WPF Concepts
• Bindings: connects 2 properties on 2 different objects so that if one of them
changes the other changes too
• Data Templates: converts non-visual data (View Model) into its visual
representation (View)
• Commands: passes the events from View to View Model
9. Advantages
• abstraction of the View (less code-behind)
• View Model is easier to unit test
• re-use
• flexibility and customization : different Views can be used with the same
View Model -> different visual representation of the same functionality
depending on what different customers want
• separation of UI design and development
10. Disadvantages
• can be overkill for simple UI
• the View Model can be hard to design (if you want to the right amount of
generality)
• harder to debug
• the Bindings can be heavier than the objects being bound