OWLNext 7.0
Borland's Object Windows Library for the modern age
|
The Doc/View model frees the programmer and the user from worrying about what type of data a file contains and how that data is presented on the screen.
Doc/View associates data file types with a document class and a view class. The document manager keeps a list of associations between document classes and view classes. Each association is called a document template (note that document templates are not related to C++ templates).
A document class handles data storage and manipulation. It contains the information that is displayed on the screen. A document object controls changes to the data and when and how the data is transferred to persistent storage (such as the hard drive, RAM disk, and so on).
When the user opens a document, whether by creating a new document or opening an existing document, the document is displayed using an associated view class. The view class manages how the data is displayed and how the user interacts with the data onscreen. In effect, the view forms an interface between the display window and the document. Some document types might have only one associated view class; others might have several. You can use different view types to let the user interact with the data in different ways.