Browsing the Order System Design Model
In this exercise, you'll use Visual Modeler to get acquainted with the design model of the order system. Visual Modeler provides you with several mechanisms for browsing the model.
Opening the Order System Design Model
To open the order system design model:
-
Start the Visual Modeler application.
-
Click Open on the File menu.
-
In the dialog box, open the folder where the order system sample has been installed.
-
Double-click on the ordersys.mdl file. Visual Modeler now opens the sample model and displays a diagram called the Three-Tiered Service Model.
This diagram shows the architecture of the order system application, that is, it shows the classes of the design model and the relations between them. Defining and maintaining the architecture and relationships within the system are among the most important aspects of large-scale iterative development.
The Three-Tiered Service Model diagram supports the three-tiered architectural approach used when building Microsoft Visual Basic applications. It separates the contents of the system into three conceptual tiers of services: user services (left pane), business services (middle pane), and data services (right pane). It is a special kind of class diagram, called a three-tiered diagram.
To the left in the application window, a browser window lists the contents of the order system design model in a hierarchical order. (If you cannot see the browser in your Visual Modeler application window, select Browser on the View menu.)
The diagram notation used in this tutorial is a subset of the Unified Modeling Language (UML). Please refer to the online help for descriptions of the different modeling constructs.
Browsing the Model
As you can see in the browser, a system can be described from three different views: a logical view, a component view, and a deployment view. The logical view is the actual design model of the system, which you will examine and change during this tutorial.
The component view describes the physical structure of the system and the mapping between the classes in the model and software components. The deployment view, which is empty in this example, is used to show the different processes of the running system and how they are related.
To browse the order system model:
-
To view the logical view in the browser, expand the Logical View package by clicking on the "+" sign.
-
Then expand the three services in the same way. The different symbols in the browser mean:
= Package (a set of closely related classes)
= Class
= Interface
= Class diagram
Note that:
-
The "<<xxx>>" in front of the name of each model element indicates the stereotype of the element. Stereotypes can be used to further specify the type of a model element. Visual Modeler uses the stereotype of a model element during code generation to decide what kind of Visual Basic item to generate from it.
-
Below the browser there is a documentation field. This field contains a textual description of the currently selected model element or diagram. (If the documentation field is not displayed, select Documentation on the View menu.).
-
If you are not familiar with a three-tiered architecture yet, select each one of the service layers user services, business services, and data services, and take a look at their descriptions in the documentation field.
-
Expand the Component View and take a look at its contents. The different symbols in the browser mean:
= Component diagram
= Component
-
The order system is implemented as one single component, an executable called OrderSystem, which corresponds to the ordersys.vbp project. All classes in the model are assigned to, and thereby implemented by, the OrderSystem component.
-
The other two components, VB and DAO, are existing DLLs that have been reverse engineered into the model because they are used by several of the classes in the model. Note that, in the Logical View, there is a package for each such component containing the interface classes provided by the component.
-
Open the Main diagram of the Component View. Note, for example, that the VB and DAO interfaces that the order system is dependent on are shown as interface classes in the diagram.
-
Close the Main component diagram.
Browsing the Class Diagrams
As you can see in the browser, the design model is illustrated in several diagrams, each one with its own purpose. The Three-Tiered Service Model diagram, located on the top level in the Logical View, is the main diagram of the order system design model. There are other diagrams that illustrate interesting details about parts of the model.
For example, to look at details about the Order class:
-
Double-click on the Order Details diagram in the Business Services package. This diagram shows details about the Order class, such as: its methods, its properties and its relations with other classes.
-
Note that the Orderrows relationship is marked with a "*" sign. This indicates that the Order class may reference a collection of OrderRow objects. Also, note that property procedures are assigned the stereotypes <<Get>>, <<Set>>, and <<Let>> in the model.
-
Close the diagram.
Browsing the Business Objects
Each class is defined by a specification.
To view the specification of one of the classes in the Business Services package:
-
Double-click on the Order class to open its specification.
-
Examine the information behind the different tabs. For example, on the Components tab, note that the class is assigned to the OrderSystem component, which means that the OrderSystem component implements this class. Then close the specification dialog box.
-
As important as understanding the detailed specification of a class is to know who is using the class. Therefore, select Order in the Three-Tiered Service Model diagram, and click Show Usage on the Report menu.
-
Select one of the diagrams in which this class is used and click Browse. Look at the diagram and the relationships between the classes. (Move the Show Usage dialog box if it covers the opened diagram.)
-
Close the diagram and the Show Usage dialog box.