UML (Unified Modeling Language) provides 14 standard diagram types divided into two main categories: Structural Diagrams (static structure) and Behavioral Diagrams (dynamic behavior).
1 Structural UML Diagrams (Static View)
These diagrams show the static structure (architecture) of the system – classes, objects, components, and how they relate to one another.
Structural Diagram | Description |
---|---|
1.1 Class Diagram | Represents classes, interfaces, and relationships (associations, inheritance, etc.). Most common in OOP. |
1.2 Object Diagram | Snapshot of objects (instances) and their relationships at a point in time. |
1.3 Component Diagram | Describes high-level components (e.g., services, modules) and their dependencies. |
1.4 Composite Structure Diagram | Shows internal structure of a class and how its parts interact. |
1.5 Package Diagram | Groups classes into packages and shows dependencies between them. |
1.6 Deployment Diagram | Shows hardware nodes and software components deployed on them. Used for system architecture. |
1.7 Profile Diagram | Extends UML by defining custom stereotypes, tagged values, and constraints. Useful in domain-specific modeling. |
2 Behavioral UML Diagrams (Dynamic View)
These focus on the dynamic behavior of the system – interactions, workflows, and activities.
Behavioral Diagram | Description |
---|---|
2.1 Use Case Diagram | Shows actors (users or systems) and their interactions with system use cases. Great for requirements gathering. |
2.2 Sequence Diagram | Models the order of message exchanges between objects. Good for detailing method calls and object interactions. |
2.3 Activity Diagram | Represents workflows of step-by-step activities and decisions. Similar to flowcharts. |
2.4 State Machine Diagram | Depicts state changes in response to events. Useful for reactive systems. |
2.5 Communication Diagram | Similar to sequence diagram, but focuses on object links and messages exchanged. |
2.6 Interaction Overview Diagram | High-level view combining sequence and activity diagrams. Shows control flow between interactions. |
2.7 Timing Diagram | Emphasizes timing constraints and duration of messages. Often used in real-time systems. |