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
2 - General Diagramming Guidelines
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
The guidelines presented in this chapter are applicable to all types of diagrams, UML or otherwise. The terms “symbols,” “lines,” and “labels” are used throughout:
■ Symbols represent diagram elements such as class boxes, object boxes, use cases, and actors.
■ Lines represent diagram elements such as associations, dependencies, and transitions between states.
■ Labels represent diagram elements such as class names, association roles, and constraints.
Readability Guidelines
Avoid Crossing Lines
When two lines cross on a diagram, such as two associations on a UML class diagram, the potential for misreading a diagram exists.
Depict Crossing Lines as a Jump
You can't always avoid crossing lines; for example, you cannot fully connect five symbols (try it and see). When you need to have two lines cross, one of them should “hop” over the other as in Figure 1.
Avoid Diagonal or Curved Lines
Straight lines, drawn either vertically or horizontally, are easier for your eyes to follow than diagonal or curved lines. A good approach is to place symbols on diagrams as if they are centered on the grid point of a graph, a built-in feature of many computer-aided system-engineering (CASE) tools. This makes it easier to connect your symbols by only using horizontal and vertical lines. Note how three lines are improved in Figure 2 when this approach is taken. Also note how the line between A and C has been depicted in “step fashion” as a line with vertical and horizontal segments.
- Type
- Chapter
- Information
- The Elements of UML™ 2.0 Style , pp. 4 - 14Publisher: Cambridge University PressPrint publication year: 2005