Professional Documents
Culture Documents
Dynamic
Activity diagram
Sequence diagram
Object diagram
State diagram
Collaboration diagram
3
Implementation
Component diagram
Deployment diagram
4
system.
5
Sequence Diagram
It is used primarily to design, document and validate the
architecture, interfaces and logic of the system by describing
the sequence of actions that need to be performed to
complete a task or scenario
This diagram is a very useful design tools because it provide
a dynamic view of the system behavior which can be difficult
to extract from static diagrams or specifications.
6
Vertical Axis
Vertical line is draw to represents Life Line of Object (Time
Sequence)
The lifeline represents the existence of the object at a
particular time
If the object is created or destroyed during the period of
time then its lifeline starts or stops at the appropriate point;
otherwise it goes from the top to the bottom of the diagram
If the object is destroyed during the diagram, then its
destruction is marked by a large “X”
8
Activation
An activation (focus of control) shows the period of time
during which an object is performing an action either directly
or through a message.
An activation is shown as a tall thin rectangle whose top is
aligned with its initiation time and whose bottom is aligned
with its completion time
9
Graphical Representation
10
Messages
Messages (Cont.)
Return Values
Optionally indicated using a dashed arrow with a label
indicating the return value.
Don’t model a return value when it is obvious what is being
returned, e.g. getTotal()
Model a return value only when you need to refer to it
elsewhere, e.g. as a parameter passed in another message.
Prefer modeling return values as part of a method
invocation, e.g. ok = isValid()
13
Synchronous Messages
Nested flow of control, typically implemented as an operation
call.
The routine that handles the message is completed before
the caller resumes execution.
:A :B
doYouUnderstand()
Caller return
Blocked yes (optional)
14
Asynchronous
Object Creation
• An object may create another object via a
<<create>> message.
Preferred
:A :B :A
<<create>> <<create>>
:B
Constructor
21
: Order : CatalogEntry
: Client Object
creation
add(qty,part)
<<Creates>>
: OrderLine
getCost()
return cost
23
Object Destruction
An object may destroy another object via a <<destroy>>
message.
:A :B
<<destroy>>
Object Destruction: Order Entry Example
: Order : OrderLine
: Client
remove(line)
<<destroy>>
X
Object
deletion
25
: Order : CatalogEntry
: Client
add(qty,part)
getStockLevel(part)
return s
: OrderLine
[s>=qty] OrderLine(qty,part) getCost()
return cost
29
Combined Fragment
Scenario
i. The user will submit the cheque for withdraw.
insufficient fund.
32
33
programs.
Deployment Diagram
Target Audience
Deployment diagrams are useful for system engineers.
An efficient deployment diagram is very important
because it controls the following parameters
i. Performance
ii. Scalability
iii. Maintainability
iv. Portability
41
Nodes:
Nodes are nothing but physical hardwares used to
deploy the application.
Deployment diagrams consist of nodes and their
relationships.
42
Sample Scenario
Application Flow
• The application is assumed to be a web based
application which is deployed in a clustered
environment using server 1, server 2 and server 3.
The user is connecting to the application using
internet. The control is flowing from the caching
server to the clustered environment.
44