You are on page 1of 39

Chapter 3

Modeling With
Unified Modeling Language
(UML)

Learning Outcome


Describe :
What is meant by a model
 Concept of modeling
 The distinction between a model and
a diagram
 The UML concept of a model


2010 Bennett, McRobb and Farmer

What is Model?


A model is an abstract representation of a


system, constructed to understand the system
prior to building or modifying it
A simplified representation of reality [Turban,
1993]
A model provides a means for
conceptualization and communication of ideas
in a precise and unambiguous form
More typically are represented by diagrams
3

What is a Diagram?
Abstract shapes are used to represent
things or actions from the real world
 Diagrams follow rules or standards
 The standards make sure that different
people will interpret the diagram in the
same way


40

2010 Bennett, McRobb and Farmer

Diagrams vs. Models





A diagram illustrates some aspect of a system.


A model provides a complete view of a system
at a particular stage and from a particular
perspective.
A model may consist of a single diagram, but
most consist of many related diagrams and
supporting data and documentation.

2010 Bennett, McRobb and Farmer

Why Use a Model?


A model is quicker and easier to build
than the real thing
 A model can be used in a simulation
 A model can evolve as we learn
 We can choose which details to include in
a model
 A model can represent real or imaginary
things from any domain


2010 Bennett, McRobb and Farmer

What is Modeling?


Modeling frequently is used during many of the


phases of the software life cycle (e.g., analysis and
design)
Most modeling techniques used for analysis and
design involve graphic languages (sets of symbols)
The system needs to be examined from various
perspectives and its features need to be modeled
Modeling enables us to cope with the complexity of a
system
7

Why modeling?


Building a model for a software system prior to its


construction is as essential as having a blueprint
for building a large building
Essential for communication among project
teams
The use of visual notation to represent or model a
problem can provide us several benefits relating
to clarity, familiarity, maintenance, and
simplification

Modelling Organizations
Organizations are human activity systems.
 The situation is complex
 Stakeholders have different views
 We have to model requirements
accurately, completely and unambiguously
 The model must not prejudge the solution

2010 Bennett, McRobb and Farmer

Modeling Notations
It is important to have standard notations for
modeling, documenting, and communicating
decisions
 Modeling helps us to understand
requirements thoroughly


Holes in the models reveal unknown or


ambiguous behavior
 Multiple, conflicting outputs to the same input
reveal inconsistencies in the requirements


Modeling key ideas










Clarity easily can understand the system


Familiarity similar to the way in which the
information actually is represented and used
Maintenance make changes faster and less
errors
Simplification simplicity and conceptual
understanding
a model is rarely correct on the first try
always seek the advice and criticism of others
avoid excess model revisions, as they can distort
the essence of your model
11

What is UML? Unified


Modeling Language


Is a language. It is not simply a notation for drawing


diagrams, but a complete language for capturing
knowledge(semantics) about a subject and expressing
knowledge(syntax) regarding the subject for the
purpose of communication.

Applies to modeling and systems. Modeling involves a


focus on understanding a subject (system) and
capturing and being able to communicated in this
knowledge.

It is the result of unifying the information systems and


technology industrys best engineering practices
(principals, techniques, methods and tools).

What is UML?


Convergence of different notations used in object-oriented methods, mainly


OMT (James Rumbaugh and collegues), OOSE (Ivar Jacobson), Booch
(Grady Booch)
They also developed the Rational Unified Process, which became the Unified
Process in 1999

25 year at GE Research, where he


developed OMT, joined (IBM)
Rational in 1994, CASE tool
OMTool

At Ericsson until 1994, developed


use cases and the CASE tool
Objectory, at IBM Rational since
1995,
http://www.ivarjacobson.com

Developed the
Booch method
(clouds), ACM
Fellow 1995, and
IBM Fellow 2003
http://www.booch.co
m/

What is UML?


Nonproprietary standard for modeling software systems,


OMG
Convergence of notations used in object-oriented methods
OMT (James Rumbaugh and collegues)
Booch (Grady Booch)
OOSE (Ivar Jacobson)

Current Version: UML 2.2


Information at the OMG portal http://www.uml.org/

Commercial tools: Rational (IBM),Together (Borland), Visual Architect


(business processes, BCD)




Open Source tools: ArgoUML, StarUML, Umbrello


Commercial and Opensource: PoseidonUML (Gentleware)

UML



used for both database and software modeling


version 1.1 was adopted in November 1997 by the
Object Management Group (OMG) as a standard
language for object-oriented analysis and design
Initially based on a combination of the Booch, OMT
(Object Modeling Technique) and OOSE (ObjectOriented Software Engineering) methods, UML was
refined and extended by a consortium of several
companies, and is undergoing minor revisions by the
OMG Revision Task Force.
Ivar Jacobson is known as the father of Use Cases.

References www.inconcept.com/JCM/April1998/halpin.html

15

Modeling and the UML


The larger the project is , the more important
the modeling is.
 Unified Modeling Language (UML) is the
language that has been adopted by Object
Management Group (OMG)
 UML provides a wide variety of notations for
modeling many aspects of software systems


16

Different types of
models

17

Conceptual, Logical, and


Physical Models
The products of analysis and design are
expressed through conceptual, logical, and
physical models
 They are expressive enough to allow a
developer to capture all of the decisions that
need to be made during the analysis of a
system and complete enough to serve as
blueprints for implementation


18

Conceptual, Logical, and


Physical Models
The conceptual model captures the system
in terms of the domain entities that exist (or
will exist) and their association with other
such entities of your system
 The conceptual level of modeling is
performed using the terminology of your
business domain and should be technologyagnostic


19

Conceptual, Logical, and


Physical Models
 The

logical view of a system takes the


concepts created in the conceptual
model and establishes the existence
and meaning of the key abstractions
and mechanisms that will determine the
systems architecture and overall
design
20

Conceptual, Logical, and


Physical Models
 The

physical model of a system


describes the concrete software and
hardware composition of the systems
implementation technology-specific

21

Unified Process and UML


Transition
Construction
Elaboration
Inception

methodology







Software development is a process in phases


This process has to follow a methodology
Each phase is supported by graphs & diagrams
The are different kinds of documents and various
usage of them
UML is an essential language for diagrams, offering
computer support as well as the right patterns for the
various stages of refinement and viewpoints
22

UML Diagrams
Every complex system is best approached
through a small set of nearly independent
views of a model no single view is
sufficient
 The choice of what models or diagrams one
creates has a great influence on how a
problem is encountered and how a
corresponding solution is shaped


23

Diagrams in UML


UML diagrams consist of:


icons
 two-dimensional symbols
 paths
 Strings

Plan Chapter

Produce
First Draft

Revise Draft
[not satisfied]
[satisfied]

UML diagrams are defined in


the UML specification.
2010 Bennett, McRobb and Farmer

Add Exercises

Add References
to Bibliography

24

Relationship between Models


and Diagrams


Use Case Diagrams are one view of the Use


Case Model in the Requirements Model

Requirements Model

Requirements
List

Use Case Model

Campaign Management
Assign staf f
to work on
a campaign

include
Campaign Management

Assign staf f
to work on
a campaign

Find campaign

include
include

Add a new
adv ert to
a campaignFind campaign

include

include
Campaign Add a new
Manager adv ert to
a campaign

Initial System
Architecture
Model

include
Check campaign
budget

Campaign
Manager
Check campaign
budget

Interface
Prototypes

extend

Use Cases

Accountant
Print campaign
summary

extend

extend

Print campaign
summary

extend

Print campaign
invoice

Print campaign
invoice

Accountant

Use Case Diagrams


One View of the Use Case Model

Glossary

2010 Bennett, McRobb and Farmer

25

Examples of Models


Requirements Model
complete view of requirements
 may include other models, such as a Use
Case Model
 includes textual description as well as sets of
diagrams


2010 Bennett, McRobb and Farmer

26

Examples of Models


Behavioural Model
shows how the system responds to events
in the outside world and the passage of
time
 an initial model may just use
Communication Diagrams
 a later model will include Sequence
Diagrams and State Machines


2010 Bennett, McRobb and Farmer

27

Models in UML
A system is the overall thing that is being
modelled
 A subsystem is a part of a system
consisting of related elements
 A model is an abstraction of a system or
subsystem from a particular perspective
 A model is complete and consistent at the
chosen level of abstraction


2010 Bennett, McRobb and Farmer

28

Models in UML


Different models present different views of


the system, for example:
use case view
 design view
 process view
 implementation view
 deployment view


(Booch et al., 1999)

2010 Bennett, McRobb and Farmer

29

UML Diagrams
Structure Diagrams
Package
Diagram

Class
Diagram

Component
Diagram

Deployment
Diagram

Behavior Diagrams

Use Case
Diagram

Activity
Diagram

State
Machine
Diagram

Interaction Diagrams

Object
Diagram

Sequence
Diagram

Composite
Structure
Diagram

Interaction
Overview
Diagram

Communication
Diagram

Timing
Diagram

30

Structure Diagrams
 Used

to show the static structure of


the system and how those parts are
related to each other.
 The element in a structure diagram
represent the meaningful concepts of
a system, and may include abstract,
real world and implementation
concepts.
31

Behavior Diagrams
 To

express the dynamic


behavioral of the objects in a
system.
 Can be described as a series of
changes to the system over time

32

Interaction Diagrams




Used to describe some type of interactions among the


different elements in the model.
Performed on a per Use Case basis, examine the flow of
method call calls within a system.
Performing a complete analysis requires that each Use Case
must be examined, although in practice only selected Use
cases may be examined.
The purposes of interaction diagrams are to visualize the
interactive behavior of the system. Now visualizing interaction
is a difficult task. So the solution is to use different types of
models to capture the different aspects of the interaction.
That is why sequence and collaboration diagrams are used to
capture dynamic nature but from a different angle.
33

Interaction Diagrams


Sequence diagram displays the time sequence of


the objects participating in the interaction; consists of
the vertical dimension (time) and horizontal
dimension (different objects)
Collaboration Diagram displays an interaction
organized around the objects and their links to one
another. Numbers are used to show the sequence of
messages.

34

Developing Models


During the life of a project using an


iterative life cycle, models change along
the dimensions of:
abstractionthey become more concrete
 formalitythey become more formally
specified
 level of detailadditional detail is added as
understanding improves


2010 Bennett, McRobb and Farmer

35

Development of the Use


Case Model
Staff Management

Iteration 1
Obvious use cases.
Simple use case descriptions.

Add a new staff


member
Staff Management

Add a new staff


member
Add a new staff
grade

Add a new staff


grade
Change the
rate for a
staff grade

Acc ountant

Change the
rate for a
staff grade

Change the
grade for a
staff member

Acc ountant
Change the
grade for a
staff member
Calc ulate staff
bonuses

Calc ulate staff


bonuses

Staff Management

Add a new staff


member
Staff Management

Iteration 2
Additional use cases.
Simple use case descriptions.
Prototypes.

Add a new staff


member
Staff Management
Add a new staff
grade
Add a new staff
member
Add a new staff
grade
Change the
rate for a
staff grade
Add a new staff
grade
Acc ountant

Acc ountant

Change the
rate for a
staff grade

Change the
rate for a
staff grade

Change the
grade for a
staff member

Campaign Selection
Campaign Selection

Change the
grade for a
staff member

Acc ountant

Client:
Campaign Selection

Calc ulate staff


bonuses
Change the
grade for a
staff member

Client:

Calc ulate staff


bonuses

Client:
Campaign:

Calc ulate staff


bonuses

Campaign:

Holborn Motors
Lynch Properties
Holborn
Motors
Yellow
Partridge
Lynch
Properties
Zeta
Systems
Holborn
Motors
Yellow
Partridge
Lynch
Properties
Zeta
Systems
Yellow Partridge
Zeta Systems

Campaign:
OK

Quit

OK

Quit

OK

Quit

Campaign M anagement

Iteration 3
Structured use cases.
Structured use case descriptions.
Prototypes.

Assign staff
to work on
a cam paign

include
Campaign M anagement

Add a new
adv ert to
include
a cam paign
Campaign M anagement

Assign staff
to work on
a cam paign

Campaign
Manager

Find campaign

include

Assign staff
to work on
a cam paign

Campaign
Manager

Find campaigninc lude

include

Add a new
adv ert to
include
a cam paign

Check campaign
budget
Find campaigninc lude

include
Add a new
adv ert to
a cam paign

extend

Campaign Selection
P rint campaign
summ ary

extend
Check campaign
budget

Print cam paign


invoice

extend

Campaign Selection

Accountant
P rint campaign
summ ary

extend

extend

Check campaign
budget
inc lude

Campaign
Manager

Print cam paign


invoice

extend

Accountant
P rint campaign
summ ary

Print cam paign


invoice

Accountant

2010 Bennett, McRobb and Farmer

Client:
Campaign Selection
Client:
Client:
Campaign:
Campaign:

Holborn Motors
Lynch Properties
Holborn
Motors
Yellow
Partridge
Lynch
Properties
Zeta
Systems
Holborn
Motors
Yellow
Partridge
Lynch
Properties
Zeta
Systems
Yellow Partridge
Zeta Systems

Campaign:
OK

Quit

OK
OK

Quit
Quit

36

Recap


Describe :
What is meant by a model
 Concept of modeling
 The distinction between a model and
a diagram
 The UML concept of a model


37

References




Bruegge Dutoit (2010)


Bennet, McRobb and Farmer (2010)
The Elements of UML 2.0 Style, Scott W. Ambler,
Ronin International, 2005
The Object Primer 3rd Edition, Scott W. Ambler,
Cambridge University Press, 2004
UML Distilled: A Brief Guide to the Standard Object
Modeling Language (3rd Edition), Martin Fowler,
Addison-Wesley Professional, 2004

Additional References


Grady Booch,James Rumbaugh,Ivar Jacobson




The Unified Modeling Language User Guide, Addison Wesley,


2nd edition, 2005

Commercial UML tools




Rational Rose XDE for Java

Together (Eclipse, MS Visual Studio, JBuilder)

http://www-306.ibm.com/software/awdtools/developer/java/

http://www.borland.com/us/products/together/index.html

Open Source UML tools





http://java-source.net/open-source/uml-modeling
ArgoUML,UMLet,Violet,

You might also like