Model-View-Controller Architecture
Model-View-Controller Architecture
Architecture
Give someone a program, you frustrate them for a day;
teach them how to program, you frustrate them for a
lifetime.
— David Leinweber
2
Model-View-Controller
u Architecture for interactive apps
• introduced by Smalltalk developers at PARC
u Partitions application so that it is
• scalable
• maintainable
View
Model
Controller
What is MVC?
The Model View
Model
Controller
Controller
7
Controller Communication
View
Model
Controller
View
Model Controller
Other Ways
• No Model-View interaction
• All interaction happens through controller
• Controller talks to Model and View
• Your project
View
Model
Controller
Why MVC?
u Provides a logical structure for
heavily interactive system
u Adheres to good engineering design