UML Diagrams in Software Engineering

UML stands for Unified Modeling Language. It is a language for creating models. UML is a rich language to model software solutions, application structures, system behavior and business processes. UML is a modern approach to modeling and documenting software. In fact, it’s one of the most popular business process modeling techniques. UML helps software engineers, businessmen and system architects with modelling, design and analysis. Mainly, UML has been used as a general-purpose modeling language in the field of software engineering. 

 UML is not a programming language, it is rather a visual language. It is a way of visualizing a software program using a collection of diagrams. A UML diagram is a diagram based on the UML (Unified Modeling Language) with the purpose of visually representing a system along with its main actors, roles, actions, artifacts or classes, in order to better understand, alter, maintain, or document information about the system.

We use UML diagrams to portray the behavior and structure of a system. UML diagram is a type of graphical notation used to represent different aspects of a software system.

Types of UML diagrams:

There are several types of UML diagrams and each one of them serves a different purpose. Diagrams in UML can be broadly classified as:Structural UML diagram and Behavioral UML diagram

Structural Diagrams: Structural UML diagrams, as the name would suggest, show how the system is structured. It depict the structure of a system or process.

Structural Diagrams include: Component Diagrams, Object Diagrams, Class Diagrams and Deployment Diagrams.

Behavior Diagrams: Behavioral diagrams describe the behavior of the system, its actors, and its building components. They describe how the objects interact with each other to create a functioning system.

Behavior diagrams show the dynamic behavior of the objects in a system, which can be described as a series of changes to the system over time

Behavior diagrams include: Use Case Diagrams, State Diagrams, Activity Diagrams and Interaction Diagrams.

Structural Diagrams:

Class Diagram:

The most widely used UML diagram is the class diagram. It is the main building block of any object-oriented solution. Class diagrams are the backbone of almost every object-oriented method, including UML. They describe the static structure of a system.

It shows the classes in a system, attributes, and operations of each class and the relationship between each class. Class UML diagram is the most common diagram type for software documentation. It is a central modeling technique that runs through nearly all object-oriented methods.

 

Behavior Diagrams:

Use Case Diagrams: Use case diagrams model the functionality of a system using actors and use cases. They are widely used to illustrate the functional requirements of the system and its interaction with external agents (actors). Use case diagrams give a graphic overview of the actors involved in a system, different functions needed by those actors and how these different functions interact.

 

Activity Diagrams: In software development, activity diagram is generally used to describe the flow of different activities and actions. Activity diagrams illustrate the dynamic nature of a system by modeling the flow of control from activity to activity.

Activity diagrams represent workflows in a graphical way. They can be used to describe the business workflow or the operational workflow of any component in a system. We can also use an activity diagram to refer to the steps involved in the execution of a use case. We model sequential and concurrent activities using activity diagrams. So, we basically depict workflows visually using an activity diagram. An activity diagram focuses on condition of flow and the sequence in which it happens. We describe or depict what causes a particular event using an activity diagram.

 

Sequence Diagram: A sequence diagram simply depicts interaction between objects in a sequential order i.e. the order in which these interactions take place.

A sequence diagram, sometimes referred to as an event diagram or an event scenario, shows the order in which objects interact. Sequence diagrams describe how and in what order the objects in a system function. These diagrams are widely used by businessmen and software developers to document and understand requirements for new and existing systems.

Difference between DFD and UML diagram:

DFD and UML are two popular modelling techniques used in software engineering to represent and understand complex system. DFD and UML diagrams are both powerful modelling tools that can be used to represent complex systems in different ways, depending on the specific needs of the project. There are some points of difference between DFD and UML diagrams:

  1. Purpose: DFDs are used to show how data flows through a system, whereas UML diagrams are used to show the structure, behavior and interactions of a software system. DFDs are primarily used for visualizing and analyzing data flow and processes, while UML diagrams are used for modelling and designing object-oriented systems and software.
  2. Scope: DFDs are mainly used for modelling the flow of data within a system, whereas UML diagrams can represent a wider range of concepts, such as object-oriented programming, use cases and behavior.
  3. Representation: DFDs use a set of standard symbols and notations to represent data flow, processes, data stores and external entities, while UML uses a wide range of diagrams, such as class diagrams, sequence diagrams and activity diagrams.
  4. Elements: DFDs mainly consist of entities, process, data stores and data flows whereas UML diagrams include more complex elements such as classes, objects, interfaces and interactions.
  5. Application: DFDs are commonly used in business modelling and analysis, while UML diagrams are commonly used in software development and design.
  6. Abstraction: DFDs represent a high level view of a system and focus on data flow. whereas UML diagrams provide a more detailed view of the system and its components, including classes, objects and relationships.
  7. Analysis vs Design: DFDs are more commonly used in the analysis phase of the software development life cycle, UML diagrams are used for both analysis and design.

Leave a Comment