Concept
What is the Model-View-Controller paradigm?
The Model-View-Controller paradigm is how you create user interfaces in Smalltalk. The advantage of the MVC paradigm is that it effectively limits and defines the interaction between the interface components and the underlying problem-domain classes. The disadvantage is that it is relatively inefficient and complex.
- The Model is the problem-domain class that you want to create an interface on. There is an actual class
Model that you should subclass to create any problem domain class that you want to (a) be affected by an interface or (b) display to an interface.
- The View is the class that receives input from the user (e.g., button clicks, keypresses, etc.) and displays output to the user (e.g., display boxes, colored symbols, visualizations, etc.)
- The Controller is the class that deals with the physical input devices and translates those signals (mouse movement, keyboard input) into messages to the appropriate view. The Controller separates, for example, button clicks on a button from a button click that should bring up a menu. For the most part, we don't deal with Controllers in 2390.
References to this concept: