Book contents
- Frontmatter
- Contents
- Preface
- 1 Introduction
- 2 General Diagramming Guidelines
- 3 Guidelines for Common UML Modeling Elements
- 4 UML Use-Case Diagrams
- 5 UML Class Diagrams
- 6 UML Package Diagrams
- 7 UML Sequence Diagrams
- 8 UML Communication Diagrams
- 9 UML State Machine Diagrams
- 10 UML Activity Diagrams
- 11 UML Component Diagrams
- 12 UML Deployment Diagrams
- 13 UML Object Diagrams
- 14 UML Composite Structure Diagrams
- 15 UML Interaction Overview Diagrams
- 16 UML Timing Diagrams
- 17 Agile Modeling
- Bibliography
- Index
3 - Guidelines for Common UML Modeling Elements
Published online by Cambridge University Press: 17 December 2010
- Frontmatter
- Contents
- Preface
- 1 Introduction
- 2 General Diagramming Guidelines
- 3 Guidelines for Common UML Modeling Elements
- 4 UML Use-Case Diagrams
- 5 UML Class Diagrams
- 6 UML Package Diagrams
- 7 UML Sequence Diagrams
- 8 UML Communication Diagrams
- 9 UML State Machine Diagrams
- 10 UML Activity Diagrams
- 11 UML Component Diagrams
- 12 UML Deployment Diagrams
- 13 UML Object Diagrams
- 14 UML Composite Structure Diagrams
- 15 UML Interaction Overview Diagrams
- 16 UML Timing Diagrams
- 17 Agile Modeling
- Bibliography
- Index
Summary
An important benefit of the UML is that it is consistent, and part of that consistency is the application of common modeling elements across different diagrams. This chapter describes guidelines for
■ Notes
■ Stereotypes
■ Frames
■ Interfaces
Guidelines for UML Notes
A UML note is a modeling construct for adding textual information—such as a comment, constraint definition, or method body—to UML diagrams. As you can see in Figure 6, notes are depicted as rectangles with the top right corners folded over.
Describe Diagrams with Notes
Ever look at a diagram and not know what it represents? A simple solution is to include a UML note on each diagram that provides a simple and concise description. This is often referred to as a “legend.” In Figure 6 you can see that the name of the system, the purpose of the diagram, and its owner are indicated. It is common also to indicate when the diagram was last updated and the contact information for the owner.
Set a Convention for Placement of Diagram Legends
Placing diagram legends in the same place on all your diagrams increases their usability by making them easy to find. Common spots are one of the corners or the bottom center of a diagram.
Left-Justify Text in Notes
It is common practice to left-justify text in UML notes, as you can see in Figure 6.
Prefer Notes over OCL or ASL to Indicate Constraints
Source code, describing a constraint or processing logic, can be modeled on any UML diagram using a note.
- Type
- Chapter
- Information
- The Elements of UML™ 2.0 Style , pp. 15 - 32Publisher: Cambridge University PressPrint publication year: 2005