Date post: | 30-Dec-2015 |
Category: |
Documents |
Upload: | claude-harvey |
View: | 215 times |
Download: | 0 times |
1
SAD2 - UMLSAD2 - UML22ndnd Lecture Lecture
Sequence DiagramSequence Diagram
and other dynamic viewsand other dynamic views
Lecturer: Dr Dimitrios MakrisLecturer: Dr Dimitrios Makris(([email protected]))
3
Summary of this session
Sequence Diagram Other Dynamic Views
Activity Diagrams Collaboration (Communication)
Diagram State Diagram Timing Diagram Interaction Overview Diagram
4
Summary of Elaboration Phase “A mile wide, an inch deep” approach Use Case Diagrams
Define the scope and the size of the project Capture Requirements
Conceptual Modelling (Class Diagrams) Define semantics Base for the final class diagrams
Before the Construction phase, use cases should be assessed and ranked
5
Construction Phase Each Use Case defines an iteration
(Analysis, Design, Implementation, Testing) Analysis:
Write a detailed (full) Use Case. Use interaction (sequence) diagrams to visualise the
detailed Use Case. Design:
Convert the sequence diagram to collaboration. Enrich the class diagram with new classes, attributes
and methods. Some other types of diagrams (state, activity) may be
also used.
6
Activity Diagram
It describes the sequencing of activities
It is the UML version of the flowchart diagram In addition, it also supports concurrent
activities Not necessarily an Object Oriented
diagram
8
Why to use Activity Diagrams
Applications Multithreaded Programming Business ModellingIn Software Development process Understanding workflow (elaboration
phase) Analysing a use case (construction phase) Describing a complicated sequential
algorithm
10
Sequence Diagram Basic Notation (II)
Lifeline, Activation, Creation, Destruction.
Return messages
Recursive calls
11
Types of Messages Different types of messages → Different arrowheads Some confusion in books and tools, because notation
changed in the past Even Microsoft Visio & Schaum Outlines UML use the old
notation. For this module, use the following (UML 2.0) notation:
When an objects sends a synchronous message, it must wait for the return message to regain control.
When an object sends an asynchronous message, it does not have to wait for the reply and it can keep doing other things.
12
Sequence Diagram in UML 2 (I)
Head of lifelines: Use participants instead of objects
:Order:Order
UML 2: participant
UML 1.x: object
13
Sequence Diagram in UML2 (II)
Better control of iterative and conditional flow
Operators in interaction frames: Alt, opt, par,
loop, region, neg, ref, sd
14
Sequence Diagram in practice
Keep diagrams simple A4 page If diagram too complicate, split it
Don’t try to capture every scenario Simple alternative scenarios can be avoid Powerful UML notation – Need for
simplicity New classes
Avoid (many) controller classes Avoid God classes
15
Sequence Diagram Summary Dynamic View Represents sequencing of actions …and behaviour assigned to
objects Significantly improved in UML2.0
16
Collaboration (Communication) Diagram
Renamed in UML 2.0 Collaboration & Sequence diagram
known as interactive diagrams Almost equivalent to sequence
diagram Focus on Objects Used to enrich the class diagram
18
State Diagrams Describe dynamic behaviour of individual
object Object is treated as isolated Detect events and response
State is a set of values that defines same response to events If object in different state, then response may be
different for the same event State Diagram represents states and
transitions
24
Summary Sequence Diagram shows both the
sequencing of actions and the interaction between objects.
Sequence Diagram is used to analyse and visualise a use case.
UML offers a variety of diagrams that represent dynamic views of the system.