Rational Rose
CASE Tools
Developing complex applications is made easier by using so-called CASE, or
Computer-Aided Software Engineering tools. A CASE tool often includes a class
modeler tool that allows the developer to design the class structure of an
application in UML notation. The collection of classes making up the application
together with their relationships (aggregation, association, inheritance etc.)
form the "logical view" or "logical model" of the application.
Froward and Reverse Engineering
A CASE tool often has two capabilities that are important to establish the connection
between the logical view (model) and the actual implementation (code) of a program.
Forward Engineering: Given the UML model, generate the corresponding code.
Reverse Engineering: Given the code for some classes, generate the corresponding model.
In most cases the CASE tool allow a wide selection of programming languages
for implementation (Java, C++, VB, C#, Pascal etc.) and sometimes notations that
are different from UML (Booch, OMT etc.)
Rational Software, Inc. was a company founded by the "three amigos" (Booch, Jacobson, Rambaugh)
, the creators of UML. The company's main product was Rational Rose, a CASE Tool
to forward and reverse engineer UML models. It is now a division of IBM.
Rational Rose has multiple "views" or models of an application. The two most important ones
are the "logical view" which is the actual class model (in UML notation), and the
"physical view" that consists of "components" that contain the actual (code) implementation
of the classes of in the logical view.
Rational Rose Development Environment
Example: University Model
Forward Engineering
In Rational Rose:
- Create the model in Logical View
- Create a new Component in Component View
- Right click to Open Specifications, select Realizes
- Select the classes for component, right click and select Assign
- Right click for the appropriate language, e.g. ANSI C++, select Generate Code ...
- The Code Generation form comes up. All classes will be specified ADD or UPDATE. Hit OK to complete.
Reverse Engineering
In Rational Rose:
- Click File new for and new model, cancel out of the project selection
- Select Component View - Main
- Add a new Component
- Right click component to select Open Specifications ...
- Select language e.g. ANSI C++ and hit OK
- Right click ANSI C++ - Open C++ Specifications ..
- On the Files tab, hit Add Files, and click the ellipse (...) button
- Select all *.h and *.cpp files and hit Open then OK
- Right click component to Reverse Engineer ... and hit OK
- Select Logical View, there is a new folder called C++ Reversed Engineered
- Select the C++ Reversed Engineered Folder
- Add classes to Logical View - it will show inheritance and aggregation
Printing a UML diagram
In Rational Rose:
- Select File, Print, Layout and choose Fit to page
- In Printer Properties select Landscape
- Hit Print Preview to check and OK to print
Click here for a more detailed description of the Rational Rose Round-Trip Engineering process.