Intent
Decouple state, screen presentation and user input into dedicated
objects model, view and controller, so that each object can be reused independently.
Applicability
- the same model needs to be presented in different ways and/or multiple
times on the screen
- the same view needs to support different ways of user input
Structure
- [to do: diagram with Model, View and Controller]
Consequences
- Observer design pattern with Model acting as Subject and View and Controller
acting as Observers
- Strategy design pattern with View and Model acting together as StrategyContext
and Controller as Strategy.
Implementation
- push/pull model for notifications of Model changes in View and Controller
- can result in complex dependencies between view and controller (often
resorted by creating a combined View-Controller object)
Uses in JHotDraw