A frame in the
UML encapsulates a
collection of collaborating instances or refers to
another representation of such. Frames are
depicted as rectangles with a notched descriptor box in
the top left corner. Frames come in two flavors, a
diagram frame such as Batch Transcript Printing
and combined fragment frame such as the loop
frame, both in Figure 1.
Diagram frames explicitly define the boundary of a
diagram whereas combined fragment frames encompass
portions of a diagram or provide references to other
diagrams or method definitions.
Figure 1. A
frame encompassing a sequence diagram.
Figure 2. Modeling alternate
courses of logic.
Figure 3. The
internals of the seminar component.
- Avoid Diagram
Frames. The Batch Transcript
Printing diagram frame of Figure 1 adds a significant amount of visual
clutter in the process.
Use Interaction Occurrences Over Part Decompositions. There are two references to
logic external to Figure 1:
the TranscriptBatch object includes a
reference to PrintRun and there is a combined
fragment referencing the SharedServices.print()
method. The style of the first reference is
called a part decomposition and the second an
Fully Specify Operation Names in References.
- Depict One
Interface Per Port.
connection points between a classifier and its
environment which, are depicted on the side of frames
as small rectangles.
- Depict One Port Per
Realizing Class. See also
UML interface style guidelines.
Frame Borders. In Figure 1
you see that the frame border is lighter than the lines
Standard Labels to Descriptors.
summarizes common labels for diagram frames and
Table 2 the common labels for
Table 1. Diagram
Table 2. Combined
Indicates several alternatives,
only one of which will be taken, separated by
dashed lines. Used to model if and
switch statements. See the example in
Indicates that the fragment
models an assertion.
Indicates that the fragment must
be treated as atomic and cannot be interleaved
with other event occurrences. Often used within
a par frame (Douglass 2004).
Models logic which will be
potentially repeated several times.
Models optional logic depending
on the run-time evaluation of a guard.
Indicates several fragments of logic, separated
by dashed lines, all of which will run in
References another diagram or a