6. MVC - Implementation
Model
◦ Model either doesn’t know about View or knows
view through interface.
◦ Models doesn't know about controller.
View
◦ View knows the concrete instance of model.
◦ View doesn't know about controller. Or may know
it through interface
Controller
◦ Controller knows both Views and Model.
7. MVC - Consequences
Clear separation. Worked well in
Desktop applications as well as Web
applications.
Difficult to write automated tests for
Controllers
10. Model-View-ViewModel
Separation among
◦ data and
◦ Maintaining transient state and manipulation of
model data. Allow data binding
◦ its display representation and
In GoF terms, ViewModel is an adapter
between View and Model
Used in WPF
12. MVVM - Implementation
Model
◦ Doesnot know about View
◦ Doesnot know about ViewModel or may know
about ViewModel through interface
ViewModel
◦ Knows about Model
◦ Doesnot know about View or knows about view
through interface
View
◦ Knows about ViewModel
◦ Doesn’t know about Model
16. References
Presentation Model Pattern by Martin
Fowlers
http://martinfowler.com/eaaDev/Presenta
tionModel.html
Prism: Patterns For Building Composite
Applications With WPF by Glenn Block
http://msdn.microsoft.com/hi-
in/magazine/cc785479%28en-us%29.aspx