UML - Development Process 1 Software Development Process Using UML (2)
UML and the development process
-
Upload
suelly-pereira -
Category
Documents
-
view
220 -
download
0
Transcript of UML and the development process
-
7/27/2019 UML and the development process
1/44
TRAINING & CONSULTING UML and the developmentprocess
ABIS Training & [email protected]
ABIS 2005
Document number: 1140_03a.fm24 February 2005
Address comments concerning the contents of this publication to:ABIS Training & Consulting, P.O. Box 220, B-3000 Leuven, BelgiumTel.: (+32)-16-245610, Fax: (+32)-16-245691
Copyright ABIS N.V.
-
7/27/2019 UML and the development process
2/44
-
7/27/2019 UML and the development process
3/44
UML and the development process iii
TABLEOF CONTENTSDEVELOPMENTPROCESSES & MODELING 5
1 ____The (OO) development process ____________________________________6
2 ____The Unified Modeling Language (UML) ______________________________8
3 ____The (R)UP____________________________________________________10
4 ____Agile Modeling_________________________________________________11
5 ____Goals of UML _________________________________________________12
6 ____UML Diagrams Overview ________________________________________13
7 ____UML usage modes _____________________________________________16
THE UML DIAGRAMS 19
1 ____Use Case Diagram _____________________________________________21
2 ____Class Diagram_________________________________________________24
3 ____Sequence Diagram ____________________________________________29
4 ____State(chart) diagram ____________________________________________33
5 ____Activity diagram________________________________________________35
6 ____Package Diagram ______________________________________________38
7 ____Component Diagram ___________________________________________40
8 ____Deployment Diagram ___________________________________________41
-
7/27/2019 UML and the development process
4/44
UML and the development process iv
-
7/27/2019 UML and the development process
5/44
ABIS Training & Consulting 5
Development processes &
Modeling
Objectives :
How do processes realize flexibility?
Positioning UML
-
7/27/2019 UML and the development process
6/44
Development processes &
Modeling
1. The (OO) development proc-
ess2. The Unified Modeling Lan-
guage (UML)
3. The (R)UP
4. Agile Modeling
5. Goals of UML
6. UML Diagrams Overview
7. UML usage modes
UML and the development process ABIS 6
The (OO) development process 1
Stages/activities:
Requirements gathering
Analysis
- real world model
- what, not how (no implementation details)
Technical Design:
- (software) objects & components
- overall architecture (system)
Implementation
Deployment
...
-
7/27/2019 UML and the development process
7/44
Development processes &
Modeling
1. The (OO) development proc-
ess2. The Unified Modeling Lan-
guage (UML)
3. The (R)UP
4. Agile Modeling
5. Goals of UML
6. UML Diagrams Overview
7. UML usage modes
UML and the development process ABIS 7
Incremental and iterative development
Waterfall:
- no iteration
- milestones
- easy to plan
Incremental:
- parts of system completed at
different times
different rates- no revision
- relatively easy to plan
Iterative:
- reworking parts of system
- aim: improve quality
- difficult to plan
-
7/27/2019 UML and the development process
8/44
Development processes &
Modeling
1. The (OO) development proc-
ess2. The Unified Modeling Lan-
guage (UML)
3. The (R)UP
4. Agile Modeling
5. Goals of UML
6. UML Diagrams Overview
7. UML usage modes
UML and the development process ABIS 8
The Unified Modeling Language (UML) 2
UML (1997):common set of modelling constructs and notations
Originally based on methods by Rumbaugh, Booch and Jacobson
UML is not a standardized development process!
Current version V1.5 (2003) >> V2.0 (2004)
-
7/27/2019 UML and the development process
9/44
Development processes &
Modeling
1. The (OO) development proc-
ess2. The Unified Modeling Lan-
guage (UML)
3. The (R)UP
4. Agile Modeling
5. Goals of UML
6. UML Diagrams Overview
7. UML usage modes
UML and the development process ABIS 9
The Unified Software Development Process
By the same 3 Amigos (1999)
principles:
- use-case driven
- architecture centric
- iterative
- incremental
-
7/27/2019 UML and the development process
10/44
Development processes &
Modeling
1. The (OO) development proc-
ess2. The Unified Modeling Lan-
guage (UML)
3. The (R)UP
4. Agile Modeling
5. Goals of UML
6. UML Diagrams Overview
7. UML usage modes
UML and the development process ABIS 10
The (R)UP 3
By the 3 amigos > Rational
Iterating many times over several workflows (disciplines)
Artifacts / Deliverables
-
7/27/2019 UML and the development process
11/44
Development processes &
Modeling
1. The (OO) development proc-
ess2. The Unified Modeling Lan-
guage (UML)
3. The (R)UP
4. Agile Modeling
5. Goals of UML
6. UML Diagrams Overview
7. UML usage modes
UML and the development process ABIS 11
Agile Modeling 4
A more lightweight approach
Popular examples:
Extreme Programming
DSDM
Scrum
-
7/27/2019 UML and the development process
12/44
Development processes &
Modeling
1. The (OO) development proc-
ess2. The Unified Modeling Lan-
guage (UML)
3. The (R)UP
4. Agile Modeling
5. Goals of UML
6. UML Diagrams Overview
7. UML usage modes
UML and the development process ABIS 12
Goals of UML 5
Provide expressive modelling language (visual + ...)
Be independent of
- programming language
- process
Flexible and extensible
- OCL (Object Constraint Language)
- UML Profiles
Encourage OO tools market >> exchangeability:
- XMI
- Diagram Interchange
Support higher-level reuse concepts
Model Driven Architecture (MDA)
-
7/27/2019 UML and the development process
13/44
Development processes &
Modeling
1. The (OO) development proc-
ess2. The Unified Modeling Lan-
guage (UML)
3. The (R)UP
4. Agile Modeling
5. Goals of UML
6. UML Diagrams Overview
7. UML usage modes
UML and the development process ABIS 13
UML Diagrams Overview 6
Can be used at different stages of any process.
Requirements:
- use case diagram
Static structure:
- class diagram
- object diagram
Dynamic behaviour:
- sequence & collaboration/communication diagrams
- statechart diagram
- activity diagram
Architectural:
- package diagram
- component diagram
- deployment diagram
-
7/27/2019 UML and the development process
14/44
Development processes &
Modeling
1. The (OO) development proc-
ess2. The Unified Modeling Lan-
guage (UML)
3. The (R)UP
4. Agile Modeling
5. Goals of UML
6. UML Diagrams Overview
7. UML usage modes
UML and the development process ABIS 14
UML Diagrams (..)
makeinvoice
Borrower Item
Book CD z : Book
x : CD
title="UMLsongs"
y : CD
john
H
H
thingxxx
yyyzzz
thing
xxx
zzz
yyy
-
7/27/2019 UML and the development process
15/44
Development processes &
Modeling
1. The (OO) development proc-
ess2. The Unified Modeling Lan-
guage (UML)
3. The (R)UP
4. Agile Modeling
5. Goals of UML
6. UML Diagrams Overview
7. UML usage modes
UML and the development process ABIS 15
CASE Tools
covering the development cycle from the top
central repository
sometimes including the implementation (coding / code generation)
reverse engineering / round-trip engineering
e.g.
- Rational Rose
- Together
- System Architect
trend: better integration with IDE (e.g. Rational XDE)
(limited upper CASE:) e.g. Visio, ArgoUML, ...
-
7/27/2019 UML and the development process
16/44
Development processes &
Modeling
1. The (OO) development proc-
ess2. The Unified Modeling Lan-
guage (UML)
3. The (R)UP
4. Agile Modeling
5. Goals of UML
6. UML Diagrams Overview
7. UML usage modes
UML and the development process ABIS 16
UML usage modes 7
(according to Martin Fowler )
Three ways to use UML:
UML as a sketch
UML as a blueprint (from design to coding)
UML as a programming language (>> MDA)
-
7/27/2019 UML and the development process
17/44
Development processes &
Modeling
1. The (OO) development proc-
ess2. The Unified Modeling Lan-
guage (UML)
3. The (R)UP
4. Agile Modeling
5. Goals of UML
6. UML Diagrams Overview
7. UML usage modes
UML and the development process ABIS 17
MDA
MDA = Model Driven Architecture
Promoted by OMG:
1 PIM (Platform Independent Model)
leads to many PSMs (Platform Specific Model)
UML (UML2!) plays key role
-
7/27/2019 UML and the development process
18/44
Development processes &
Modeling
1. The (OO) development proc-
ess
2. The Unified Modeling Lan-
guage (UML)
3. The (R)UP
4. Agile Modeling
5. Goals of UML
6. UML Diagrams Overview
7. UML usage modes
UML and the development process ABIS 18
-
7/27/2019 UML and the development process
19/44
ABIS Training & Consulting 19
The UML Diagrams
Objectives :
Why so many?
Where & when do I use which?
-
7/27/2019 UML and the development process
20/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram
5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 20
About nails and screwdrivers
Most UML diagrams are usefulfor multiple jobs in the development process:
e.g. class diagram:
analysis > conceptual modeling design
implementation
-
7/27/2019 UML and the development process
21/44
-
7/27/2019 UML and the development process
22/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram
5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 22
Use Case Diagram (..)
system: what are we building
(> boundary!)
actors (roles): who will use the system?
(=people and machines)
- primary actors
- secondary/supporting actors
use cases: what for?
A rather informal technique...
Use case details in
text template
(optional) activity diagrams
(optional) system sequence diagram (SSD)
>> Use case driven process
-
7/27/2019 UML and the development process
23/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram
5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 23
Use Case Template
MAIN SUCCESSSCENARIO Step Action
1 Customer feeds bank card into ATM.
2 ATM identifies customer with BankSys.
3 Customer enters PIN code.
4ATM gets customer and account details (balance, limits, etc) from
BankSys.5 Customer specifies desired amount.
6 ATM delivers the cash.
7 Customer takes the cash.
8 ATM delivers a printed ticket.
9 ATM delivers the customers bank card10 Customer takes the card and ticket.
EXTENSIONS Step Branching Action
2aInvalid or unreadable bank card2a1. ATM returns card; use case terminates.
4aInvalid PIN code (1st-2nd attempt):
4a1. Use cases resumes at step 3
4bInvalid PIN code (3rd attempt):4a. ATM swallows card; use case terminates.
*aCustomer walked away without notice (time-out 30 seconds):a1. ATM swallows card; use case terminates.
etc... etc...
-
7/27/2019 UML and the development process
24/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram
5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 24
Class Diagram 2
The workhorse& most elaborated/matured/versatile of them all...
firstName:StringlastName:String
setName(String, String)getAddress():Address
Person
name
doThis(..)doThat(..)
Company
works for
employee employer
1..* 0..1
someBankStuff
getTotalSavings():MoneydoThat(..)
Bankrole
associatonmultiplicity
attributes
operations generalization
-
7/27/2019 UML and the development process
25/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram
5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 25
Class Diagram: Domain Model
title : Stringduration : Numberprice
Course
startDate
Session
canceled: Boolean
Enrolment
firstName
lastNamefunction
Person
namephoneNr: Phone
Company
streettown
zipCode
Address
works for
1 *
1
*
*
1
*
1
{ordered}
succeeds
*
*
*
0..1enroller
enrolleelocation
1
Room
*
name
description
KnowledgeDomain
*
instructor
s
respons
e
or
1
1
*
AbisPerson
-
7/27/2019 UML and the development process
26/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram
5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 26
Design Class Diagram (DCD)
Shape
-color : String
+area() : double
+getColor() : Color
-radius : double
+area() : double+getRadius() : double
Circle
-height : double-width : double
+area() : double+getHeight() : double+getWidth() : double
Rectangle
Point
origin
1Client
-
7/27/2019 UML and the development process
27/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 27
DCD (..)
addAlarmnListener( AlarmListener lis )publishAlarmEvent( time )setTime( newTime )
AlarmClock
onAlarmEvent( source, time )
interfaceAlarmListener
WatchDog
onAlarmEvent( source, time )onAlarmEvent( source, time )
Beeper
onAlarmEvent( source, time )
AlarmWindow
...setTitle()setVisible()...
javax.swing.JFrame *
display notificationdialog box
beep
-
7/27/2019 UML and the development process
28/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 28
Collaborating objects
From analysis to design:
design software objects (based on domain model + ...)
realizing the responsibilities as imposed by the use cases.
This is the real object stuff:
beyond static structure
show how objects interact
Interaction through messages:
objects invoking operations on other objects
getting returns
Two UML diagram types:
sequence diagram
collaboration/communication diagram
-
7/27/2019 UML and the development process
29/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 29
Sequence Diagram 3
xfer(m:Money, a2)
a1:Account john:Person
check()
[OK] minus(m)
a2:Account
plus(m)
xfer(m:Money, a2)
a1:Account :Person
check() : Boolean
[OK] minus(m)
a2:Account
[OK] plus(m)
bank policy:make sureowner is ok
a
b
{b-a < 0.5 sec}
-
7/27/2019 UML and the development process
30/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 30
Sequence Diagram (..)
:Client:PersonMapper
:Map database
a resultSet
get(123)
[not found]select * from people where id=123
mary: Person
create()
get person data
create with person data
find(123)
mary
whatever(..)
a result set
opt
-
7/27/2019 UML and the development process
31/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 31
Sequence Diagram (..)
All kind of participants:
business objects, controllers, GUI components entire (sub)systems
persons, organisations
-
7/27/2019 UML and the development process
32/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 32
SSD: System Sequence Diagram
optional, summarizes use case
system events & system operations
starting point for use case realization
Customer
:ATM
card
PIN
getCash(amount)
cash
taken!
ticket, card
Banksys
identifyUser()
balance, limits, ...
registerWithdrawal()
-
7/27/2019 UML and the development process
33/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 33
State(chart) diagram 4
Modeling the lifecycle of an object:
state = condition of an object between events(a way of behaving, of reacting to events)
event = something that happens
state transition = change of state, caused by an event
-
7/27/2019 UML and the development process
34/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 34
Statechart diagram (..)
Use ad lib for modeling life cycle of interesting objects e.g.
devices (living vs. dead objects)
use cases, (G)UI navigation, transactions
-
7/27/2019 UML and the development process
35/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 35
Activity diagram 5
[not available]
receive order
calculate
price
find
instructor
assignto course
[notagreed]
check pricewith customer
cancel
order
dispatch
to order
[agreed]
[available]
-
7/27/2019 UML and the development process
36/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 36
Activity diagram (..)
receive order
pick ordersend
invoice
receive
paymentdeliver order
close
order
Stock Customer Service Finance Dept.
-
7/27/2019 UML and the development process
37/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 37
Activity Diagram (..)
Kind of degenerated statechart (at least in UML1...)
Polyvalent use for flow of activities:
business analysis & workflow
use cases
design level: operations, algorithms, ...
-
7/27/2019 UML and the development process
38/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 38
Package Diagram 6
Grouping interrelated classes
Controlling dependencies
xxx
Client
+TrackingForm+ OrderForm- Order
Client
Client
+TrackingForm
+OrderForm
- Order
Y Z
A B
+
-
-
A B
P k Di & S A hi
-
7/27/2019 UML and the development process
39/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 39
Package Diagram & System Architecture
Domain
Order UI Swing
Order Application DateMoneyetc.
Comon {global}
Orders Customers
Database
Th UML DiC t Di
-
7/27/2019 UML and the development process
40/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 40
Component Diagram 7
a modular, deployable, replaceable part of system (= physical!)
encapsulates implementation
exposes interfaces
fileorder.cpp
imports
fileordmod.h
databaseDB2 browserMozzila
databaseCourseDB
filehup.jar
libraryacledit.dll
EJBSessionEnrolmentSession
HTTP
processTomcat
IEnrolmentSession
The UML DiagramsDeplo ment Diagram
-
7/27/2019 UML and the development process
41/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 41
Deployment Diagram 8
Shows where instances of components are running:on physical nodes (= some computer).
: Client
: Server
: DBServer
database
products : Oracle
browser: Mozzila
process: Tomcat
HTTP
ejb-server: WAS
EJBSession: EnrolmentSession
IEnrolmentSession
SQL
The UML DiagramsWant some more diagrams?
-
7/27/2019 UML and the development process
42/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 42
Want some more diagrams?
Check UML2, e.g.:
Composite Structure
Interaction Overview
Timing
The UML DiagramsConclusion?
-
7/27/2019 UML and the development process
43/44
The UML Diagrams
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 43
Conclusion?
UML is a well-filled toolbox,
but YOU as a developer are still the craftsman (or the artist) ...
The UML Diagrams
-
7/27/2019 UML and the development process
44/44
g
1. Use Case Diagram
2. Class Diagram
3. Sequence Diagram
4. State(chart) diagram5. Activity diagram
6. Package Diagram
7. Component Diagram
8. Deployment Diagram
UML and the development process ABIS 44