Constructing and visualizing applications using UML
Rational Application Developer provides UML visual editing support to simplify the development of complex Java applications. Developers can create and modify Java classes and interfaces visually using class diagrams. Review of the structure of an application, by viewing the relationships between the various elements that comprise the application, is facilitated using Rational Application Developer Browse and Topic diagrams. Model elements such as classes and packages are synchronized automatically with their corresponding source code, allowing developers the freedom to choose to edit the model or the source code as required.
The code visualization capabilities of Application Developer provide diagrams that enable developers to view existing code from different perspectives. Unlike the diagrams offered in Rational Software Modeler or Rational Software Architect, these are visualizations of actual code only. This means that full UML 2.1 modeling is not possible using Rational Application Developer. The UML support is present only to provide a way to visualize and understand the code or to allow the editing of code from its visual representation in a model. This is in fact a very common way in which UML is typically employed.
Visual editing offers developers the ability to produce code without explicitly typing the code into a text editor. A palette is used to drag and drop different modelling elements, such as classes and interfaces, onto a diagram. In the case of classes it is the possible to edit them visually, for example, to add operations and attributes or to define their relationships with other classes.
Rational Application Developer supports the following types of UML diagrams:
| Class diagrams-This type of UML diagram presents the static structure of an application. A class diagram shows visually the classes and interfaces from which the application is composed, their internal structure and the relationships which exist between them. A specific class diagram is created to help with understanding the application and to allow development of the application to take place. When visually representing the static view of an application, as many class diagrams are created by the developer as required, and a single class diagram typically presents a subset of all the classes and interfaces present in an application. Class diagrams are created within a project and exist permanently in that project until deleted.
|
| Sequence diagrams-This type of UML diagram presents the dynamic structure of an application. It shows the interactions between objects present in an executing application. Objects present in a executing application interact through the exchange of messages and the sequencing of this message exchange is an important aspect of any application. In the case of Java applications, the most basic type of messaging between objects is the method call. Sequence diagrams visually represent objects and their lifelines and the messages they exchange. They also provide information about the sequencing of messages in time. Sequence diagrams are created within a project and exist permanently in that project until deleted.
|
| Browse diagrams-Browse diagrams are specific to Rational Application Developer. They are not a new type of diagram as such just a facility provided within Rational Application Developer for the creation of diagrams. A browse diagram exists temporarily, is not editable and allows a developer to explore the details of an application through its underlying elements and relationships. Browse diagrams are not a permanent part of a model, they are created as needed to allow exploration of a model. A browse diagram provides a view of a chosen context element. Context element exploration takes place in a similar way to the way Web pages are viewed in a Web browser when navigating a Web site. You cannot add or modify individual diagram elements or save a browse diagram in an project. However, you can convert a browse diagram to a UML class diagram or save it as an image file for use elsewhere.
|
| Topic diagrams-Topic diagrams share many of the features of browse diagrams except that they are generated through the execution of a query on the application model and remain permanently in a project when created. You can customize the underlying query, open multiple topic diagrams at the same time and save them away for further use. Each time a topic diagram is opened the query is executed and the diagram is populated. They are invaluable when discovering the architecture of an existing application.
|
| Static method sequence diagrams-This is a type of topic diagram that is used for viewing sequence diagrams. They are non-editable diagrams that visually represent and explore the chronological sequence of messages between instances of Java elements in an interaction. You can create a static sequence diagram view of a method (operation), including signatures, in Java classes and interfaces to illustrate the logic inside that operation.
|