0% found this document useful (0 votes)
75 views17 pages

Unified Modeling Language

UML (Unified Modeling Language) is a standard modeling language used to visualize the design of software systems. It includes diagrams for modeling both structural and behavioral aspects of a system. There are several types of diagrams, including class diagrams, sequence diagrams, use case diagrams, and state machine diagrams. UML helps software engineers, business people, and architects collaborate and plan complex applications by providing a clear way to communicate system requirements, designs, and processes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views17 pages

Unified Modeling Language

UML (Unified Modeling Language) is a standard modeling language used to visualize the design of software systems. It includes diagrams for modeling both structural and behavioral aspects of a system. There are several types of diagrams, including class diagrams, sequence diagrams, use case diagrams, and state machine diagrams. UML helps software engineers, business people, and architects collaborate and plan complex applications by providing a clear way to communicate system requirements, designs, and processes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Unified Modeling Language (UML) | An Introduction

Unified Modeling Language (UML) is a general-purpose modelling language. The main aim of
UML is to define a standard way to visualize the way a system has been designed. It is quite similar
to blueprints used in other fields of engineering.
UML is not a programming language; it is rather a visual language. We use UML diagrams to
portray the behavior and structure of a system. UML helps software engineers, businessmen and
system architects with modelling, design and analysis. The Object Management Group (OMG)
adopted Unified Modelling Language as a standard in 1997. Its been managed by OMG ever since.
International Organization for Standardization (ISO) published UML as an approved standard in
2005. UML has been revised over the years and is reviewed periodically.
Do we really need UML?
 Complex applications need collaboration and planning from multiple teams and hence require
a clear and concise way to communicate amongst them.
 Businessmen do not understand code. So UML becomes essential to communicate with non
programmers essential requirements, functionalities and processes of the system.
 A lot of time is saved down the line when teams are able to visualize processes, user
interactions and static structure of the system.
UML is linked with object oriented design and analysis. UML makes the use of elements and forms
associations between them to form diagrams. Diagrams in UML can be broadly classified as:
1. Structural Diagrams – Capture static aspects or structure of a system. Structural Diagrams
include: Component Diagrams, Object Diagrams, Class Diagrams and Deployment Diagrams.
2. Behavior Diagrams – Capture dynamic aspects or behavior of the system. Behavior
diagrams include: Use Case Diagrams, State Diagrams, Activity Diagrams and Interaction
Diagrams.
The image below shows the hierarchy of diagrams according to UML 2.2

Object Oriented Concepts Used in UML –

1. Class – A class defines the blue print i.e. structure and functions of an object.
2. Objects – Objects help us to decompose large systems and help us to modularize our system.
Modularity helps to divide our system into understandable components so that we can build our
system piece by piece. An object is the fundamental unit (building block) of a system which is
used to depict an entity.
3. Inheritance – Inheritance is a mechanism by which child classes inherit the properties of
their parent classes.
4. Abstraction – Mechanism by which implementation details are hidden from user.
5. Encapsulation – Binding data together and protecting it from the outer world is referred to as
encapsulation.
6. Polymorphism – Mechanism by which functions or entities are able to exist in different
forms.
Additions in UML 2.0 –
 Software development methodologies like agile have been incorporated and scope of original
UML specification has been broadened.
 Originally UML specified 9 diagrams. UML 2.x has increased the number of diagrams from 9
to 13. The four diagrams that were added are : timing diagram, communication diagram,
interaction overview diagram and composite structure diagram. UML 2.x renamed statechart
diagrams to state machine diagrams.
 UML 2.x added the ability to decompose software system into components and sub-
components.

Structural UML Diagrams –

1. Class Diagram – The most widely use UML diagram is the class diagram. It is the building
block of all object oriented software systems. We use class diagrams to depict the static
structure of a system by showing system’s classes,their methods and attributes. Class diagrams
also help us identify relationship between different classes or objects.
2. Composite Structure Diagram – We use composite structure diagrams to represent the
internal structure of a class and its interaction points with other parts of the system. A
composite structure diagram represents relationship between parts and their configuration which
determine how the classifier (class, a component, or a deployment node) behaves. They
represent internal structure of a structured classifier making the use of parts, ports, and
connectors. We can also model collaborations using composite structure diagrams. They are
similar to class diagrams except they represent individual parts in detail as compared to the
entire class.
3. Object Diagram – An Object Diagram can be referred to as a screenshot of the instances in a
system and the relationship that exists between them. Since object diagrams depict behaviour
when objects have been instantiated, we are able to study the behaviour of the system at a
particular instant. An object diagram is similar to a class diagram except it shows the instances
of classes in the system. We depict actual classifiers and their relationships making the use of
class diagrams. On the other hand, an Object Diagram represents specific instances of classes
and relationships between them at a point of time.
4. Component Diagram – Component diagrams are used to represent the how the physical
components in a system have been organized. We use them for modelling implementation
details. Component Diagrams depict the structural relationship between software system
elements and help us in understanding if functional requirements have been covered by planned
development. Component Diagrams become essential to use when we design and build complex
systems. Interfaces are used by components of the system to communicate with each other.
5. Deployment Diagram – Deployment Diagrams are used to represent system hardware and its
software.It tells us what hardware components exist and what software components run on
them.We illustrate system architecture as distribution of software artifacts over distributed
targets. An artifact is the information that is generated by system software. They are primarily
used when a software is being used, distributed or deployed over multiple machines with
different configurations.
6. Package Diagram – We use Package Diagrams to depict how packages and their elements
have been organized. A package diagram simply shows us the dependencies between different
packages and internal composition of packages. Packages help us to organise UML diagrams
into meaningful groups and make the diagram easy to understand. They are primarily used to
organise class and use case diagrams.

Behavior Diagrams –

1. State Machine Diagrams – A state diagram is used to represent the condition of the system
or part of the system at finite instances of time. It’s a behavioral diagram and it represents the
behavior using finite state transitions. State diagrams are also referred to as State
machines and State-chart Diagrams . These terms are often used interchangeably.So simply, a
state diagram is used to model the dynamic behavior of a class in response to time and changing
external stimuli.
2. Activity Diagrams – We use Activity Diagrams to illustrate the flow of control 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.
3. Use Case Diagrams – Use Case Diagrams are used to depict the functionality of a system or
a part of a system. They are widely used to illustrate the functional requirements of the system
and its interaction with external agents(actors). A use case is basically a diagram representing
different scenarios where the system can be used. A use case diagram gives us a high level view
of what the system or a part of the system does without going into implementation details.
4. Sequence Diagram – A sequence diagram simply depicts interaction between objects in a
sequential order i.e. the order in which these interactions take place.We can also use the terms
event diagrams or event scenarios to refer to a sequence diagram. 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.
5. Communication Diagram – A Communication Diagram(known as Collaboration Diagram in
UML 1.x) is used to show sequenced messages exchanged between objects. A communication
diagram focuses primarily on objects and their relationships. We can represent similar
information using Sequence diagrams,however, communication diagrams represent objects and
links in a free form.
6. Timing Diagram – Timing Diagram are a special form of Sequence diagrams which are used
to depict the behavior of objects over a time frame. We use them to show time and duration
constraints which govern changes in states and behavior of objects.
7. Interaction Overview Diagram – An Interaction Overview Diagram models a sequence of
actions and helps us simplify complex interactions into simpler occurrences. It is a mixture of
activity and sequence diagrams.
Class Diagram
Class diagrams are the main building block of any object-oriented solution.
It shows the classes in a system, attributes, and operations of each class
and the relationship between each class.
In most modeling tools, a class has three parts. Name at the top, attributes
in the middle and operations or methods at the bottom. In a large
system with many related classes, classes are grouped together to create
class diagrams. Different relationships between classes are shown by
different types of arrows.
Below is an image of a class diagram. Follow the link below for more class
diagram examples or get started instantly with our class diagram templates.

Click on the image to edit the above class diagram (opens in new window)
Get More UML Class Diagram Examples >>

Component Diagram
A component diagram displays the structural relationship of components of
a software system. These are mostly used when working with complex
systems with many components. Components communicate with each
other using interfaces. The interfaces are linked using connectors. The
image below shows a component diagram.

You can use this component diagram template by clicking on the image

Get More Component Diagram Templates >>

Deployment Diagram
A deployment diagram shows the hardware of your system and the
software in that hardware. Deployment diagrams are useful when your
software solution is deployed across multiple machines with each having a
unique configuration. Below is an example deployment diagram.

Click on the image to use this deployment diagram as a template

Get More Deployment Diagram Templates >>

Object Diagram
Object Diagrams, sometimes referred to as Instance diagrams are very
similar to class diagrams. Like class diagrams, they also show the
relationship between objects but they use real-world examples.

They show how a system will look like at a given time. Because there is
data available in the objects, they are used to explain complex relationships
between objects.
Click on the image to use the object diagram as a template

Get More Object Diagram Templates >>

Package Diagram
As the name suggests, a package diagram shows the dependencies
between different packages in a system. Check out this wiki article to learn
more about the dependencies and elements found in package diagrams.
Profile Diagram
Profile diagram is a new diagram type introduced in UML 2. This is a
diagram type that is very rarely used in any specification. For more detailed
technical information about this diagram type, check this link.
Composite Structure Diagram
Composite structure diagrams are used to show the internal structure of a
class. For a detailed explanation of composite structure diagrams, click
here.
Use Case Diagram
As the most known diagram type of the behavioral UML types, 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.

It’s a great starting point for any project discussion because you can easily
identify the main actors involved and the main processes of the system.
You can create use case diagrams using our tool and/or get started
instantly using our use case templates.
Click on the image to edit this template

Get More Use Case Diagram Examples >>

Activity Diagram
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. Sometimes activity diagrams are used as an
alternative to State machine diagrams. Check out this wiki article to learn
about symbols and usage of activity diagrams.
Get More Activity Diagram Templates >>

State Machine Diagram


State machine diagrams are similar to activity diagrams, although notations
and usage change a bit. They are sometimes known as state diagrams or
state chart diagrams as well. These are very useful to describe the
behavior of objects that act differently according to the state they are in at
the moment. The State machine diagram below shows the basic states and
actions.
State Machine diagram in UML, sometimes referred to as State or State chart diagram

Get More State Chart Diagram Examples >>

Sequence Diagram
Sequence diagrams in UML show how objects interact with each other and
the order those interactions occur. It’s important to note that they show the
interactions for a particular scenario. The processes are represented
vertically and interactions are shown as arrows. This article explains
the purpose and the basics of Sequence diagrams. Also, check out this
complete Sequence Diagram Tutorial to learn more about sequence
diagrams.

You can also instantly start drawing using our sequence diagram


templates.
Sequence diagram drawn using Creately

Communication Diagram
In UML 1 they were called collaboration diagrams. Communication
diagrams are similar to sequence diagrams, but the focus is on messages
passed between objects. The same information can be represented using a
sequence diagram and different objects. Click here to understand the
differences using an example.
Interaction Overview Diagram
Interaction overview diagrams are very similar to activity diagrams. While
activity diagrams show a sequence of processes, Interaction overview
diagrams show a sequence of interaction diagrams.

They are a collection of interaction diagrams and the order they happen. As
mentioned before, there are seven types of interaction diagrams, so any
one of them can be a node in an interaction overview diagram. ( image
– http://www.sa-depot.com/?page_id=645 )
Timing Diagram
Timing diagrams are very similar to sequence diagrams. They represent
the behavior of objects in a given time frame. If it’s only one object, the
diagram is straightforward. But, if there is more than one object is involved,
a Timing diagram is used to show interactions between objects during that
time frame.  ( image – http://blog.tangcs.com/2008/01/10/uml-2-diagrams/ )
Mentioned above are all the UML diagram types. UML offers many diagram
types, and sometimes two diagrams can explain the same thing using
different notations.

You might also like