UML diagram types: structure and behavior diagrams (14 examples)


In this video, we’ll give you a summary and an example of each UML diagram type.

00:00 Intro
00:58 Class diagram
01:19 Object diagram
01:35 Component diagram
01:52 Deployment diagram
02:20 Package diagram
02:43 Composite structure diagram
03:03 Profile diagram
03:22 Sequence diagram
03:41 Use case diagram
03:59 Activity diagram
04:17 State machine diagram
04:39 Communication diagram
05:00 Interaction overview diagram
05:32 Timing diagram
06:04 Summary

Structure diagrams include the following: composite structure diagram, profile diagram, object diagram, class diagram, package diagram, deployment diagram, component diagram.

Under the behavior category, we find these diagrams: state machine diagram, communication diagram, use case diagram, activity diagram, timing diagram, interaction overview diagram, sequence diagram.

Let’s kick off with class diagrams.
Software engineers use class diagrams to show the classes, attributes, and methods involved in a system and to describe their relationships to each other. Class diagrams let developers sketch a static view of a system before they go on to create it.

Another more concrete form of structure diagram is the object diagram.
Object diagrams focus on representing a system at a particular point in time. An object diagram shows the real-world instances of classes and the relationships between these instances.

Next up are component diagrams.
In any software system, the various components can be composed of other, smaller components. A component diagram shows how these individual software components interact and the dependencies between them.

Deployment diagrams don’t deal with abstract elements in a system. Instead, a deployment diagram models the physical deployment of the components, or nodes, in that system. It is concerned with real-world entities such as servers and computing resources, and with the
interaction between them as described in terms of connectivity and APIs.

Packages in UML are hierarchical groupings of elements that allow for the manageable organization of the various components in a system. For instance, packages can enable a developer to represent the different layers of code used in the system and show how these
different layers interact.

Composite structure diagrams are concerned with the internal structure of a class, or classifier, and how its internal parts collaborate via particular ports at runtime to achieve their desired purpose.

Profile diagrams enable the extension of a UML model with stereotypes. These stereotypes can be assigned to individual UML elements or connectors and used when modeling particular domains.
With the sequence diagram, we’re now moving on to the first of the behavior diagrams.

Sequence diagrams are based on the modeling of interactions between objects in a
particular time sequence. They provide an overview of how the different parts of a system
interact over time and how processes are carried out.

Use case diagrams are a simple type of behavior diagram.
Use case diagrams just show how a user can interact with a system. They depict actors and
the actions they can take to have an impact on the system.

Activity diagrams graphically show the workflows of activities and actions. These types of
diagrams are concerned with the flow of control in a system and how decisions and
conditions can lead to branching in the system.

The state machine diagram is next in the list of behavior diagrams.
State machine diagrams are designed to capture the dynamic nature of a system and how it
can change from one state to another. These diagrams show possible states and transitions,
along with the actions or events that cause the system to change states.

Now let’s look at communication diagrams.
A communication diagram is similar to a sequence diagram, as it shows the dynamic
interactions between objects over time. But a communication diagram gives more of an
overview of the entire system, with less focus on timing.

Interaction overview diagrams are concerned with the holistic view of a system. These
diagrams are similar to the activity diagram, because interaction overview diagrams visualize
the sequence of activities and flow of control. But they also allow for frames around activities
that enable complex inline interactions to be described.

The timing diagram brings us to the end of our journey through UML diagram types.
Timing diagrams are a bit like sequence diagrams, because they show the behavior of
objects in the system over time. But the timing diagram uses a linear time axis that moves
from left to right and shows how conditions change in terms of levels of lifelines.

Awesome! We’ve gone through all 14 UML diagram types. Three types of UML diagrams are
used the most: class diagrams, sequence diagrams, and use case diagrams.
You can make amazing class and sequence diagrams with Gleek, so what’re you
waiting for?

Go to and start diagramming!