Different UML Diagrams - Purpose and Usage
What is UML?
UML stands for Unified Modeling Language. It's an international industry standard graphical notation used for describing, visualizing, constructing, and documenting the artifacts of a software system.
What're the Purposes of UML?
- To reason about system behavior.
- To detect errors and omissions early in the life cycle.
- To present the proposed designs and communicate with stakeholders.
- To understand the requirements.
- To drive implementation.
What are the types of UML diagrams?
- UML Use Case Diagram
- UML Sequence Diagram
- UML Component Diagram
- UML Class Diagram
- UML Activity Diagram
- UML Collaboration Diagram
- UML Deployment Diagram
- UML Statechart Diagram
- UML Package Diagram
Look at this table to figure out the differences between various UML diagrams.
UML Use Case Diagram
A use case diagram is a type of diagram used in UML during the analysis phase of a project to identify the system functionality. It describes the interaction of people or external device with the system under design. It doesn't show much detail, but only summarizes some of the relationships between use cases, actors, and systems.
Basically, four elements need to be included in a use case diagram. They are actors, systems, use cases, and relationships. The actors represent whoever or whatever interact with the system. They can be humans, other computers, or other software systems. The use cases represent the actions that are performed by one or more actors for a particular goal. The system is whatever you are developing.
Learn More at: Use Case Diagram
UML Sequence Diagram
A sequence diagram is used in UML to describe the analysis and design phases. It's an interaction diagram that details how operations are carried out. A sequence diagram is often used to depict the chronologically-structured event flow through a use case. It's good at presenting the communication relationships between objects; and what messages trigger those communications.
A lifeline represents typical instances of the components or classes in your system. The messages are shown as arrows. They can be complete, lost or found; synchronous or asynchronous; call or signal. Activate is used to denote participant activation. Once a participant is activated, its lifeline appears. The objects are model elements that represent instances of a class or classes. The classes in UML show architecture and features of the designed system. The actor specifies a role played by a user or any other system that interacts with the subject.
Learn More at Sequence Diagram Software
UML Activity Diagram
The purpose of an activity diagram is to describe the procedural flow of actions as part of an activity. It is used to model how activities are coordinated to provide a service, to show the events needed to achieve some operation, and to illustrate how the events in a single-use case relate to one another.
The activity diagrams consist of activities, states, and transitions between activities and states. The initial state is the starting point in the activity diagram. It is the point at which you begin reading the action sequence. An activity is a unit of work that needs to be carried out. The state defines the current condition of an event or activity. Decision activity is introduced in UML to support conditionals in activities. It shows where the exit transition from a state or activity may branch in alternative directions depending on a condition. The bar represents the synchronization of the completion of those activities. Control flow in computer science refers to the order in which the individual statements, instructions, or function calls of an imperative or a declarative program are executed or evaluated. An object flow is the same thing as control flow, but it is shown as a dashed line instead of a solid one.
Learn More at Activity Diagram
UML Collaboration Diagram
A collaboration diagram is used to describe a collection of objects that interact to implement some behavior within a context. It's used to model system functionality, which is more specifically, visualize the relationship between objects collaborating to perform a particular task and model the logic of the implementation for a complex operation.
The collaboration diagram is also called a communication diagram or interaction diagram. It consists of an object, multi-object, actor, association role, delegation, link to self, constraint, and note. Objects are model elements that represent instances of a class or classes. A multi-object represents a set of lifeline instances. A link-to-self is used to link a message which can be sent from an object to itself.
Learn More at Collaboration Diagram
UML Class Diagram
A UML class diagram is not only used to describe the object and information structures in an application, but also show the communication with its users. It provides a wide range of usages, from modeling the static view of an application to describing responsibilities for a system. The composition is a special type of aggregation that denotes strong ownership.
In a UML class diagram, classes represent an abstraction of entities with common characteristics. Associations represent static relationships between classes. Aggregation is a special type of association in which objects are assembled or configured together to create a more complex object. Generalization is a relationship in which one model element (the child) is based on another model element (the parent). Dependency relationship is a relationship in which one aspect, the client, uses or depends on another aspect, the supplier.
Learn More at UML Class Diagram
UML Component Diagram
It allows application designers to verify that a system's required functionality is being implemented by components, thus ensuring that the final system will be acceptable. What's more, the component diagram is a useful communication tool among stakeholders to discuss, analyze, or improve system design.
The UML component diagram doesn't require many notations, thus very easy to draw. Below is a UML 1.0 component diagram example, requiring only two symbols: component and dependency.
Learn More at UML Component Diagram
UML Deployment Diagram
A deployment diagram is a type of diagram used in UML to describe the hardware components used in system implementations and the execution environments and artifacts deployed on the hardware. It allows you to visualize the hardware topology system, model physical hardware elements, and the communication relationship between them, and plan the architecture of the system.
Nodes represent either hardware devices or software execution environments. They could be connected through communication paths to create network systems of arbitrary complexity. A component represents a modular part of a system. A component defines its behavior in terms of provided and required interfaces. Dependency relationship is a relationship in which one element, the client, uses or depends on another aspect, the supplier.
Learn More at Deployment Diagram
UML State Diagram
The statechart diagrams allow you to model the dynamic nature of a system. They describe all of the possible states of an object as events occur. So the most important purpose of a statechart diagram is to model the lifetime of an object from creation to termination.
A state is a condition during the life of an object during which it satisfies some requirements, performs some activities, or waits for some external events. A start state is a state that a new object will be in immediately following its creation. An end state is a state that represents the object going out of existence. A transition is a relationship between two states indicating that an object in the first state will perform certain actions and enter the second state when a specified set of events and conditions are satisfied.
Learn More at UML Statechart
UML Package Diagram
The package diagrams allow you to organize the elements of a model. They are typically used to depict the high-level organization of a software project. The package diagram can show both structure and dependencies between sub-systems or modules. They can be used to group any construct in the UML, such as classes, actors, and use cases.
The package element in UML is represented by a folder icon. Each package represents a namespace. Packages can also be members of other packages, providing for a hierarchic structure in which top-level packages are broken down into sub-packages.
Learn More at Package Diagram
EdrawMax: a swiss knife for all your diagramming need
- Effortlessly create over 280 types of diagrams.
- Provide various templates & symbols to match your needs.
- Drag and drop interface and easy to use.
- Customize every detail by using smart and dynamic toolkits.
- Compatible with a variety of file formats, such as MS Office, Visio, PDF, etc.
- Feel free to export, print, and share your diagrams.