Copyright: Frequently Asked Questions revision 2.0


Editing Diagrams and Classes

How do I control the appearance of a diagram?

The commands on the Diagram Object Properties menu (located under the Edit menu), can be used to customize various Visual Modeler features. The characteristics you set via this menu affect only the selected icon(s). Setting the same characteristics through the Options dialog box (located under the Tools menu) affect future items created on the diagram.

To automatically organize the classes on the diagram, click the Layout Diagram command on the Tools menu.

You will also find some useful options on the Diagram tab in the Options dialog box under the Display and Grid sections.

How do I control the type of relationships to display in a diagram?

There are several ways to control the types of relationships to display in a diagram. To control which kind of relationships to show for the current classes in a diagram, use the Filter Relationships command on the Query menu.

To show generalization relationships between classes in the diagram and classes that are not part of the diagram, select the classes in the diagram and click Expand Selected Classes on the Query menu.

To control which relationships to show for the classes in the diagram, as well as for all classes that you create or paste in the diagram from now on, use the Options command on the Tools menu. Then select the proper options on the Diagram tab of the dialog box shown.

How do I control whether to display properties and methods for the classes in a diagram?

To control whether to show properties and/or methods for selected classes in the diagram, point at the Diagram Object Properties command on the Edit menu. Then click the appropriate command.

To control whether to show properties and/or methods for the classes in the diagram, as well as for all classes that you create or paste in the diagram from now on, use the Options command on the Tools menu. Then select the appropriate options on the Diagram tab of the dialog box shown.

What is the difference between the Delete and Delete from Model commands?

The Delete command only deletes the model element from the current diagram. However, the model element is still available in the model from the browser, and you can insert it in other diagrams.

The Delete from Model command on the other hand, deletes the model element from both the current diagram and the model itself. The model element is not accessible any more after that.

What is the difference between logical view, component view, and deployment view?

The logical view describes the logical structure of the system, that is, the classes and their relationships. The component view describes the physical structure of the system, that is, how the system is divided into .exe files and DLLs. The deployment view also shows the physical structure, but focuses on connections between the system’s nodes and the allocation of processes to nodes.

You’ll also notice the deployment view icon is different from the other 2 views.  This is because the deployment view is not a container while the other two are.

What is the default line style for Visual Modeler when using UML?

The default is now oblique. This is a rose.ini file setting (RectilinearLinesUML=Yes/No)

What happens when the last association between two classes is deleted from a diagram?

This is the same as delete from model.

What is the "show class" box in the property specification for?

 Property types are often simple, primitive, scalar, and language pre-defined. But they can technically be of arbitrary complexity. It's really a modeling choice as to whether wholly-contained data (i.e., by value containment) should be modeled as a property or as a by-value aggregation of some other class.

When simple property types are used, the user may want to constrain their choices to just those types so as to not be distracted by all of the class types in the system. When this is the case, Visual Modeler allows you to filter down the choices on available property types by deselecting the Show classes control. Visual Modeler defaults to showing classes for your choices of property types.

Can I change the font?

The font is, in most cases, a fixed size and style.  The exception to this is online help where you can right-click and select Small, Normal, or Large from the Font menu.


What is Visual Modeler?

Visual Modeler is a graphical object modeling tool that is tightly integrated with Microsoft Visual Studio 6.0. Visual Modeler allows you to fulfill the promise of object-oriented programming by quickly and easily creating applications that are maintainable, have a long lifetime, and are comprised of components that can be reused in other applications.

These are the main features of Visual Modeler:

•	Class diagrams - the design of the system you are about to develop in terms of a model, using a high level of abstraction. The diagram notation provided by Visual Modeler is a subset of the modeling constructs defined by the Unified Modeling Language (UML).

•	Code generation - the ability to automatically generate Visual Basic and Visual C++ code from the design model you have created with Visual Modeler.

•	Reverse engineering - the ability automatically create or update the model with changes made to the Visual Basic code.

•	Round-trip engineering - the combination of modeling, code generation, coding, and reverse engineering.

Visual Modeler is a subset of the Rational Rose tool, both developed by Rational Software Corp.


What is a model in Visual Modeler?

A model of a system describes a view of the system on a higher level of abstraction than the source code. Compare a system model to the description of a society, and the source code to bricks in a building. When describing a society you do not do it in terms of bricks, you probably do it in terms of buildings and groups of buildings with different purposes (schools, industries, shops, houses, and so on) and the communication paths in between (streets, roads, railways, and so on). We need such models of complex systems because it is impossible, and not interesting to everyone, to understand all the details of the system. By modeling, you can focus on one aspect at a time and also work on a higher level of abstraction. The more complex your system is, the more you need a model.

In Visual Modeler a system is modeled from three different views, each one with its own purpose:

•	Logical view - describes the logical structure of the system, that is, the classes and their relationships.

•	Component view - describes the physical structure of the system, that is, how the system is divided into .exe files and DLLs.

•	Deployment view - shows the system’s nodes, the connections in between, and the allocation of processes to nodes.


How can Visual Basic help during design?
How can Visual Modeler help during design?

There are several situations during the design phase when using a visual modeling tool like Visual Modeler has major advantages. The first situation is the early phase when you decide which classes you need and how they are related. When the first outline of the object model is stable, you need to specify each class. The requirements might still change though. Using Visual Modeler to sketch different solutions and specifying the classes means that:

•	It is easier for other people to understand the system’s design from your diagram than from the code.

•	Your development team have a common diagram notation, which means that everyone understands the diagrams without further explanation.

•	You can concentrate on what the system is supposed to do, and not how things are going to be implemented.

•	It is a quick job to change the diagrams and specifications when the requirements change, compared to the time it takes to rewrite the corresponding code.

•	You can try various design approaches and communicate your ideas among the development team members.


How can Visual Basic help during implementation?
How can Visual Modeler help during implementation?

When the interface of the classes are stable, that is, when the public properties, relationships, and methods are defined in Visual Modeler, it is time to implement the model. Using the round-trip engineering features in Visual Modeler during implementation means that:

•	You do not have to write the skeleton source code. You simply generate all class modules, data members, and method specifications. Then, the implementation phase means to refine the generated source code until you have an executable system.

•	You can automatically keep code and model consistent with each other by using the reverse-engineering feature.

•	If you have an undocumented system, you can use the reverse-engineering feature to create a model of that system, and continue the development work in the new model.

•	You can include ActiveX components in your model by using the reverse-engineering feature.


How can Visual Basic help during further development?
How can Visual Modeler help during further development?

The model is used when you discuss the structure of the system with others, or when you want new project members to quickly understand the system, as well as during further development of the system to get a quick overview of how things are related in the system.

A successful system always needs further development. If you have used Visual Modeler to document your system you will notice that:

•	The model documents important design decisions.

•	New project members easily understand how the system is structured by looking at the diagrams and studying the high-level specifications of the classes.

•	It is easy to introduce changes into the system because Visual Modeler can tell you exactly which classes are affected by a change in one class.


How is the Logical View documented?

Each package, class, method, property and relationship in the model is completely described by a specification. The model is illustrated in several diagrams, each with its own purpose. Thus, a class in the model can appear in more than one diagram. In the logical view, documentation of the following types are used to describe the system:

•	Three-tiered diagrams - illustrate the overall structure of the system. These diagrams supports the three-tiered architectural approach used when building Microsoft Visual Basic applications, by separating the components of the system into three layers of services: User Services, Business Services, and Data Services. The three-tiered model especially supports the creation of large, complex client/server applications. By default, a three-tiered diagram called Three-Tiered Service Model is created at the top level of the Logical View when a new model is opened.

•	Class diagrams - illustrate a part or an aspect of the model of special interest. For each logical package in the model there is a special, automatically created class diagram called Package Overview. A Package Overview diagram illustrates the contents of the package to which it belongs. It is automatically updated when a new class is assigned to or removed from the package. To create a new class diagram, select a package, choose Class Diagram from the Browse menu, and double-click on New. The same diagram notation is used in class diagrams, Package Overviews, and three-tiered diagrams.

•	Specifications - hold all details about the elements in the model. Each class, method, property or relationship in the model is defined by a specification, which is automatically created and updated. The specification is presented in a dialog box with tabs for different aspects. In the dialog box you are able to define and view the details about a class, method, property, or relationship. The easiest way to open the specification of a class is to simply double-click on the class symbol in a diagram or on its name in a list.


How do I start using Visual Modeler?

To create, develop, and generate code from a new model in Visual Modeler:

1. 	Create a new model by choosing New from the File menu.

2. 	Open the browser by selecting Browser on the View menu. In the browser you have access to all classes and diagrams of the model. By default, a three-tiered diagram called Three-Tiered Service Model has been created and opened. Also, three service layers: User Services, Business Services, and Data Services have been created as packages in the model.

3. 	The Three-Tiered Service Model diagram is used to make the overall design of your system. In the diagram, create the most obvious classes, relationships, properties, and methods.

5. 	Create new classes and relationships in the model by clicking the appropriate symbol in the toolbox. (To see what a relationship symbol means in the diagram toolbox, place the cursor on the symbol.)

6. 	To create new properties and methods for a class, double-click the class to open its specification. Click the right mouse button and select Insert… Give the property or method a name, and type an initial value by editing the different fields.

7. 	When you are satisfied with your model, it is time to generate the corresponding code. Select the classes for which you want to generate code and choose Generate Code from the Tools menu. Follow the instructions and click the Help button when you need help.


How do I get help online?

Visual Modeler comes with an extensive online help system containing the following books:

•	Visual Modeler, where you can learn more about the Visual Modeler modeling features, the user interface, the diagram notation, etc.

•	Quick Start with Visual Modeler, which contains a tutorial that introduces you to the basic features in Visual Modeler.

•	Round-Trip Engineering a Visual Basic Application, which describes how to perform and control code generation, and how to perform reverse engineering. It also explains the relation between a model and Visual Basic code.

•	Generating Code for a Visual C++ Application, which describes how to perform and control Visual C++ code generation. It also explains the relation between a model and Visual C++ code.

•	Microsoft Visual SourceSafe Integration, which describes how to use the Microsoft Visual SourceSafe integration in Visual Modeler.

•	Microsoft Repository Integration, which describes how to use the Microsoft Repository integration in Visual Modeler.

To open the books online window, click Visual Modeler Help Topics on the Help menu.

Furthermore, when you are in the middle of modeling and have a question regarding, for example, the meaning of a button in a dialog box or a menu item, or what a specific diagram means, simply place the cursor and focus at the place which caused the question and press the F1 button or the right mouse button. Then the online help system displays a subject related to your question.