C SC 225 Lecture 9: Design Patterns: Model-View-Controller
[ previous
| schedule
| next ]
Design Patterns: Model-View-Controller
A Compound Pattern
- Model-View-Controller is not strictly speaking a design pattern
- It is not in the GoF pattern list
- Head First calls it a "compound pattern"
- Maybe better described as a software architecture
- The model is the application logic and is completely independent of user interaction
- The view is the visual representation (GUI) of the model and is completely independent of the application logic
- The controller is responsible for translating user input into actions on the model.
- It encompasses several patterns:
- Observer : The view and possibly controller observe the model
- Strategy : The controller is the strategy for the model
- Composite : The view is a composite of GUI components
- An application structured in this way is very flexible, different views and controllers
can be applied without changing each other or the model. "Encapsulate that which changes."
[ C
SC 225 | Peter
Sanderson | Math Sciences server
| Math Sciences home page
| Otterbein ]
Last updated:
Peter Sanderson (PSanderson@otterbein.edu)