Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Introduction to Unified Modeling Language
1. T.Y.B.Sc.(Comp. Sci.) Sem. I
Object Oriented Software Engineering
(OOSE)
CS-336
Faculty
Dr. Amit D. Kasliwal
Asst. Professor
2. Chapter 2
Introduction to UML
Unified Modeling Language, as the name implies it is a modeling
language used to visualize, specify, construct and document the artifacts
of a software.
We should clearly understand that UML is not a system design or
development methodology, but can be used to document object oriented
and analysis results obtained using some methodology.
A model is the graphical, textual, mathematical, or programming code
based representation.
Models are very useful in documenting the design & analysis results.
An important reason behind constructing a model is that it helps manage
complexity.
Once models of a software constructed, it can be used for a variety of
purposes during software development, including Analysis, Specification,
Code generation, Design, Visualize and understand the problem and the
working of a system Testing, etc.
3. UML
UML provides a set of notations (e.g. rectangles, lines, ellipses, etc.) to
create a visual model of the system.
Like any other language, UML has its own syntax (symbols and
sentence formation rules) and semantics (meanings of symbols and
sentences).
We use UML diagrams to portray the behavior and structure of a
system.
Thus helping software engineers, businessmen and system architects
with modeling, design and analysis.
In the late 1980s and early 1990s, there was a large number of object
oriented design techniques and notations.
Different software development houses were using different notations
to document their object-oriented designs.
These diverse notations gave rise to a lot of confusion.
4. UML was developed to standardize the large number of object oriented
modeling notations that existed and were used extensively in the early
1990s. It uses the principles and has borrowed many concepts from
modeling techniques of :
• Object Management Technology [Rumbaugh 1991]
• Booch’s Methodology [Booch 1991]
• Object-Oriented Software Engineering [Jacobson 1992]
UML was adopted by Object Management Group (OMG) an
association of industries which tries to facilitate early formation of
standards as a de facto standard in 1997.
Above all, UML contains an extensive set of notations and suggests
construction by providing many types of diagrams.
It has successfully been used to model both large and small problems.
Its adoption by OMG and widespread acceptance, UML is now being
used in a large number of software development projects.
UML
5. UML Concept
As UML describes the real time systems, it is very important to make a
conceptual model and then proceed gradually.
The conceptual model of UML has basic building block having
following three major elements
Things
Relationships
Diagrams
Things are the most important element of building blocks of UML.
Things can be
Structural
Behavioral
Grouping
Annotational
6. Structural Things define the static part of the model.
It represent the physical and conceptual elements.
Class − Class represents a set of objects having similar responsibilities.
Interface − Interface defines a set of operations, which specify the
responsibility of a class.
Actor: It comes under the use case diagrams. It is an object that
interacts with the system from outside. For example, a user.
UML Concept
7. Behavioral Things consists of the dynamic parts of proposed model.
Interaction − It is defined as a behavior that consists of a group of
messages exchanged among elements to accomplish a specific task.
State machine − State machine is useful when the state of an object in
its life cycle is important.
It defines the sequence of states an object goes through in response to
events. Events are external factors responsible for state change
UML Concept
8. Collaboration: It represents the interaction between things that is done
to meet the goal.
Use case: Use case is the core concept of object-oriented modeling.
It portrays a set of actions executed by a system to achieve the goal.
Component: It represents the physical part of the system.
Node: Represent physical element that exists at run time.
UML Concept
9. Grouping Things can be defined as a mechanism to group elements of
a UML model together.
Package − Package is the only one grouping thing available for
gathering structural and behavioral things.
Annotational Things can be defined as a mechanism to capture
remarks, descriptions, and comments of UML model elements.
Note - It is the only one Annotational thing available used to render
comments, constraints, etc. of an UML element.
UML Concept
10. UML Concept
Relationship is another most important building block of UML.
It shows how the elements are associated with each other and this
association describes the functionality of an application.
There are four kinds of relationships.
Association is basically a set of links that connects the elements of a
UML model.
Dependency is a relationship between two things in which change in
one element also affects the other.
It also describes how many objects are taking part in that relationship.
11. Generalization can be defined as a relationship which connects a
specialized element with a generalized element.
It basically describes the inheritance relationship in the world of
objects.
Realization can be defined as a relationship in which two elements are
connected.
One element describes some responsibility, which is not implemented
and the other one implements them.
This relationship exists in case of interfaces.
UML Concept
12. UML Concept
UML Diagram used to construct, capture and view the software by
using different types of diagrams.
The different UML diagrams provide different perspectives of the
software system to be developed and facilitate a comprehensive
understanding of the system.
Such models can be redefined to get the actual implementation of the
system.
The UML diagrams can capture the following five views of a system:
• User’s view
• Structural view
• Behavioral view
• Implementation view
• Environmental view
13. User's view
This contains the diagrams in which the user's part of interaction with
the software is defined.
No internal working is defined in this view for model. The diagrams
contained in this view is Use case Diagram.
Structural view
In the structural view, only the structure of the model is explained.
This gives an estimation of what the software consists of.
However, internal working is still not defined in this model.
The diagram that this view includes are Class Diagrams, Object
Diagrams.
UML Concept
14. Behavioral view
The behavioral view contains the diagrams which explain the behavior of
the software. It includes Sequence Diagram, Collaboration Diagram, State
chart Diagram and Activity Diagram.
Environmental view
This view explains the user interactions & software effects on the system.
It helps in view how the different components are implemented on
different pieces of hardware. It contain Deployment diagram
Implementation view
The view consists of the diagrams that represent the implementation part.
This view is related to the developer’s views.
This is the only view in which the internal workflow of the software is
defined. It contains Component Diagram
UML Concept
16. Advantages of UML
Robust
Reusable
Flexible
With UML, we know exactly what we are getting.
We will have lower development costs.
Software will behave as we expect it to.(With Fewer surprises)
The right decisions are made before we are given poorly written code.
We can develop more memory and processor efficient systems.
System maintenance costs will be lower.
Less relearning takes place.
Communication with stakeholders will be more efficient.