The Representations
The instance of the object model illustrated in
An Instance of the Company Object Model can be represented in several different ways according to your requirements. For example, you could display it as:
A tree structure: The participation of the employees of one department in various projects with their related costs.
A matrix (or table): The participation of the employees of the company in all ongoing projects with their related costs.
These two types of representation are illustrated below.
A Tree Representation of the Company Object Model
A Matrix Representation of the Company Object Model
For each type of representation of an object-model instance handled by an application component—in our example, a tree and a matrix—you must define a view type. Each view ensures that each time a server object is modified, created, or removed following a request issued from an application component, other application components connected to the object model will be notified of this update. Application components can be graphical applications or any other type of application.
According to the foregoing requirements, two view types must be defined to represent the Company object model:
One view type will be associated with the representation of a Department as a tree. The tree representation will be managed by the Tree application component.
The other view type will be associated with a representation of the Company as a matrix. The matrix representation will be managed by the Matrix application component.
View types and the object model interact through a view server (see its definition in “View Server”). Figure 7.5 illustrates the Company view server, which is made up of an instance of our object model and a group of views.
The Company View Server
Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.