UML (Unified Modeling Language)
UML (Unified Modeling Language)
What is UML
The UML stands for Unified modeling language, is a standardized general-purpose visual
modeling language in the field of Software Engineering. It is used for specifying, visualizing,
constructing, and documenting the primary artifacts of the software system. It helps in
designing and characterizing, especially those software systems that incorporate the concept
of Object orientation. It describes the working of both the software and hardware systems.
The UML was developed in 1994-95 by Grady Booch, Ivar Jacobson, and James Rumbaugh
at the Rational Software. In 1997, it got adopted as a standard by the Object Management
Group (OMG).
The Object Management Group (OMG) is an association of several companies that controls
the open standard UML. The OMG was established to build an open standard that mainly
supports the interoperability of object-oriented systems. It is not restricted within the
boundaries, but it can also be utilized for modeling the non-software systems. The OMG is
best recognized for the Common Object Request Broker Architecture (CORBA) standards.
Goals of UML
o Since it is a general-purpose modeling language, it can be utilized by all the modelers.
o The UML diagrams are made for business users, developers, ordinary people, or
anyone who is looking forward to understand the system, such that the system can be
software or non-software.
o Thus it can be concluded that the UML is a simple modeling approach that is used to
model all the practical systems.
Characteristics of UML
Conceptual Modeling
Before moving ahead with the concept of UML, we should first understand the basics of the
conceptual model.
Following are some object-oriented concepts that are needed to begin with UML:
o Object: An object is a real world entity. There are many objects present within a
single system. It is a fundamental building block of UML.
o Class: A class is a software blueprint for objects, which means that it defines the
variables and methods common to all the objects of a particular type.
OO is an analysis of objects, and design means combining those identified objects. So, the
main purpose of OO analysis is identifying the objects for designing a system. The analysis
can also be done for an existing system. The analysis can be more efficient if we can identify
the objects. Once we have identified the objects, their relationships are then identified, and
the design is also produced.
The purpose of OO is given below:
o To identify the objects of a system.
Following are the steps where OO concepts are applied and implemented:
Step 1: OO Analysis
The main purpose of OO analysis is identifying the objects and describing them correctly.
After the objects are identified, the designing step is easily carried out. It is a must to identify
the objects with responsibilities. Here the responsibility refers to the functions performed by
the objects. Each individual object has its own functions to perform. The purpose of the
system is fulfilled by collaborating these responsibilities.
Step 2: OO Design
This phase mainly emphasizes on meeting the requirements. In this phase, the objects are
joined together as per the intended associations. After the association is completed, the
designing phase also gets complete.
Step 3: OO Implementation
This is the last phase that comes after the designing is done. It implements the design using
any OO languages like C++, Java, etc.
As the UML is a modeling language used to model software as well as non-software systems,
but here it focuses on modeling OO software applications. It is essential to understand the
relation between the OO design and UML. The OO design can be converted into the UML as
and when required. The OO languages influence the programming world as they model real
world objects.
UML-Diagrams
The UML diagrams are categorized into structural diagrams, behavioral diagrams, and
also interaction overview diagrams. The diagrams are hierarchically classified in the
following figure:
1. Structural Diagrams
Structural diagrams depict a static view or structure of a system. It is widely used in the
documentation of software architecture. It embraces class diagrams, composite structure
diagrams, component diagrams, deployment diagrams, object diagrams, and package
diagrams. It presents an outline for the system. It stresses the elements to be present that are
to be modeled.
o Class Diagram: Class diagrams are one of the most widely used diagrams. It is the
backbone of all the object-oriented software systems. It depicts the static structure of
the system. It displays the system's class, attributes, and methods. It is helpful in
recognizing the relation between different objects as well as classes.
o Composite Structure Diagram: The composite structure diagrams show parts within
the class. It displays the relationship between the parts and their configuration that
ascertain the behavior of the class. It makes full use of ports, parts, and connectors to
portray the internal structure of a structured classifier. It is similar to class diagrams,
just the fact it represents individual parts in a detailed manner when compared with
class diagrams.
o Object Diagram: It describes the static structure of a system at a particular point in
time. It can be used to test the accuracy of class diagrams. It represents distinct
instances of classes and the relationship between them at a time.
o Deployment Diagram: It presents the system's software and its hardware by telling
what the existing physical components are and what software components are running
on them. It produces information about system software. It is incorporated whenever
software is used, distributed, or deployed across multiple machines with dissimilar
configurations.
o Package Diagram: It is used to illustrate how the packages and their elements are
organized. It shows the dependencies between distinct packages. It manages UML
diagrams by making it easily understandable. It is used for organizing the class and
use case diagrams.
2. Behavioral Diagrams:
Behavioral diagrams portray a dynamic view of a system or the behavior of a system, which
describes the functioning of the system. It includes use case diagrams, state diagrams, and
activity diagrams. It defines the interaction within the system.
o Use Case Diagram: It represents the functionality of a system by utilizing actors and
use cases. It encapsulates the functional requirement of a system and its association
with actors. It portrays the use case view of a system.
3. Interaction Diagrams
Interaction diagrams are a subclass of behavioral diagrams that give emphasis to object
interactions and also depicts the flow between various use case elements of a system. In
simple words, it shows how objects interact with each other and how the data flows within
them. It consists of communication, interaction overview, sequence, and timing diagrams.
o Timing Diagram: It is a special kind of sequence diagram used to depict the object's
behavior over a specific period of time. It governs the change in state and object
behavior by showing the time and duration constraints.