Dynamic View Services > View and Notification Services > Presenting the Company Example > The Representations
 
The Representations
The instance of the object model illustrated in Figure 7.2 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.
Figure 7.3    A Tree Representation of the Company Object Model
Figure 7.4    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.
Figure 7.5    The Company View Server

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.