760: Mainline
The modelview approach leads to applications
defined in terms of four class types:
- Model classes, which embody domain knowledge
- View classes, which embody information-display knowledge
- Observer classes and listener
classes, which embody knowledge about connections between models and views
- One application class, which both serves as a
view and performs the following services:
- Creates model, view, observer, and listener instances
- Connects model instances to view instances, via observer instances, and
view instances to model instances, via listener instances
- Establishes containercomponent relations among the views
The application class serves as a view because it provides the master
container, such as a frame, that creates a window for the application on a
screen.