System Sequence Diagrams

Slides:



Advertisements
Similar presentations
Chapter 11 Designing the User Interface
Advertisements

ESE Einführung in Software Engineering 7. Modeling Behaviour Prof. O. Nierstrasz.
Drawing System Sequence Diagrams
Systems Analysis and Design in a Changing World, Fourth Edition
Summary Class responsibility cards can be used to help allocate responsibilities between different classes. The use of stereotype classes, such as entity,
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
Chapter 10 System Sequence Diagrams. What is a System Sequence Diagram? A way of modeling input and output events related to systems It is a picture that.
7M822 UML Sequence Diagrams 2 December 2010.
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
NJIT Drawing System Sequence Diagrams Chapter 10 Applying UML and Patterns Craig Larman Presented by Anuradha Dharani.
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
חוזים – Contracts 1. Larman – Chapter 10 – SSDs 10.2 What are System Sequence Diagrams? (introduction) Use cases describe how external actors interact.
Designing with Interaction and Design Class Diagrams Chapters 15 & 16 Applying UML and Patterns Craig Larman With some ideas from students in George Blank’s.
Unified Modeling Language
LECTURE 5 SEQUENCE DIAGRAM 1. INTRODUCTION – SYSTEM SEQUENCE DIAGRAM A system sequence diagram is a fast and easily created artifact that illustrates.
TK2023 Object-Oriented Software Engineering CHAPTER 6 SYSTEM SEQUENCE DIAGRAMS.
Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative Development Part III Elaboration Iteration I – Basic1.
Chapter 7: The Object-Oriented Approach to Requirements
SEQUENCE DIAGRAM Prepared by: T. Fatimah Alageel.
Sequence Diagram Tutorial
INFO 620Lecture #51 Information Systems Analysis and Design Sequence and Collaboration Diagrams INFO 620 Glenn Booker.
Interaction diagrams Sequence and collaboration diagrams.
Interaction Modeling Interaction model describes how objects interact to produce useful results. Interactions can be modeled at different levels of abstraction:
Object Oriented Analysis and Design System Events & Contracts.
System Sequence Diagrams. Recap When to create SSD? How to identify classes/instances? Use case descriptions UML notations for SSD.
4 2009/10 Object Oriented Technology 1 Topic 4: The Object-Oriented Approach to Requirements Adopted from: Ch.7 The Object-Oriented Approach to Requirements.
Dynamic Modeling Chapter 11 Part of Analysis Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
1 Sequence Diagrams (Based on Stevens and Pooley (2006, Chapters 9, 10) and Fowler (2004, Chapter 4)) David Meredith Aalborg University.
Group 2 work What is sequence diagram ? What is sequence diagram ? Why do we use it ? Why do we use it ? What is basic notation of SD? What is basic notation.
PRJ566 System Sequence Diagrams.  A system sequence diagram …. Illustrates input and output events related to the system under discussion.  Larman,
7 Systems Analysis and Design in a Changing World, Fifth Edition.
1 UML Sequence Diagrams UML Distilled, Third Edition, Chapter 4 M. Fowler.
♦ Use Case Model  Detailled use case - Important  Use case diagram- Refactoring Use case diagram  > 1 Last Lectures.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Object-Oriented Analysis and Design CHAPTER 10: SYSTEM SEQUENCE DIAGRAMS 1.
Drawing System Sequence Diagrams
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
COMP-350 Object-Oriented Analysis and Design Drawing System Sequence Diagrams Reference: Larman, Chapter 9.
Use Case Driven Analysis Requirements Use Case Use Case Description System Sequence Diagram Chapter 5.
System sequence diagrams
CSCI-383 Object-Oriented Programming & Design Lecture 12.
System Sequence Diagram Chandan Rupakheti & Steve Chenoweth Week 5-3a.
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
Systems Analysis and Design in a Changing World, Fourth Edition
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
Chapter 3: Introducing the UML
Summary from previous lectures
 The Sequence Diagram models the collaboration of objects based on a time sequence.  It shows how the objects interact with others in a particular scenario.
 System Sequence Diagrams Sheridan SYST Engineering Quality Systems 11.
SYSTEM-LEVEL SEQUENCE DIAGRAMS Sys466. System-Level Sequence Diagrams  Use cases describe how external actors interact with the software system…  An.
Unified Modeling Language (UML) for OO domain analysis CSE432 Prof Glenn Blank.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
More on UML 1. 1.Use-case diagram 2.Class diagram [Object diagram] (static) 1.1 Domain/analysis model – of reality 1.2 Design model – of decisions 3.
1 Object Oriented Analysis and Design System Events & Contracts.
Systems Analysis and Design in a Changing World, Fourth Edition
Standard UML: Communication and Dynamic Behavior
System sequence diagrams
BTS430 Systems Analysis and Design using UML
Object-Oriented Systems Analysis and Design Using UML
Sequence Diagrams.
Princess Nourah bint Abdulrahman University
Princess Nourah bint Abdulrahman University
How do we convince people that in programming simplicity and clarity —in short: what mathematicians call "elegance"— are not a dispensable luxury, but.
Sequence Diagrams Lecture 6.
UML Diagrams: Sequence Diagrams Dynamic Analysis Model
CIS 375 Bruce R. Maxim UM-Dearborn
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
CIS 375 Bruce R. Maxim UM-Dearborn
Presentation transcript:

System Sequence Diagrams Based on Craig Larman, Chapter 10 and Anuradha Dharani’s notes

Dynamic behaviors Class diagrams represent static relationships. Why? What about modeling dynamic behavior? Interaction diagrams model how groups of object collaborate to perform some behavior Typically captures the behavior of a single use case Use Case: Order Entry  1) An Order Entry window sends a “prepare” message to an Order 2) The Order sends “prepare” to each Order Line on the Order 3) Each Order Line checks the given Stock Item 4) Remove appropriate quantity of Stock Item from stock 5) Create a deliver item Alternative: Insufficient Stock 3a) if Stock Item falls below reorder level then Stock Item requests reorder  

Sequence diagrams Vertical line is called an object’s lifeline Represents an object’s life during interaction Object deletion denoted by X, ending a lifeline Horizontal arrow is a message between two objects Order of messages sequences top to bottom Messages labeled with message name Optionally arguments and control information Control information may express conditions: such as [hasStock], or iteration Returns (dashed lines) are optional Use them to add clarity

A time for systems analysis ”To every thing there is a season, and a time to every purpose under heaven.” Ecclesiastes 3:1 What UP phase are your projects in? What have you determined about your projects? Preliminary requirements analysis determines a vision and scope, use cases, risks and estimates I.e., is there a project worthy of pursuing? Next comes systems analysis: Clarifies input and output System events and which Objects trigger them Generates System Sequence Diagrams from Use Cases Why does this activity make sense now?

System Sequence Diagram (SSD) For a use case scenario, an SSD shows: The System (as a black box) The external actors that interact with System The System events that the actors generate SSD shows operations of the System in response to events, in temporal order Develop SSDs for the main success scenario of a selected use case, then frequent and salient alternative scenarios :System

SSD for Process Sale scenario (Larman, page 175)

From Use Case to Sequence System Diagram How to construct an SSD from a use case: Draw System as black box on right side For each actor that directly operates on the System, draw a stick figure and a lifeline. For each System events that each actor generates in use case, draw a message. Optionally, include use case text to left of diagram.

Example: use cases to SSD

Identifying the right Actor In the process Sale example, does the customer interact directly with the POS system? Who does? Cashier interacts with the system directly Cashier is the generator of the system events Why is this an important observation?

Naming System events & operations System events and associated system operations should be expressed at the level of intent Rather than physical input medium or UI widget Start operation names with verb (from use case) Which is better, scanBarCode or enterItem?

SSDs and the Glossary in parallel Why is updating the glossary important when developing the SSD? New terms used in SSDs may need explanation, especially if they are not derived from use cases A glossary is less formal, easier to maintain and more intuitive to discuss with external parties such as customers

SSDs within the Unified Process Create System Sequence Diagrams during Elaboration in order to: Identify System events and major operations Write System operation contracts (Contracts describe detailed system behavior) Support better estimates Remember, there is a season for everything: it is not necessary to create SSDs for all scenarios of all use cases, at least not at the same time

Concurrency in Sequence Diagrams Concurrent processes: UML 1: asynchronous messages as horizontal lines with half arrow heads UML 2 makes this distinction by not filling an arrowhead Fowler prefers older notation. Why? Which do you prefer? After setting up Transaction Coordinator, invoke concurrent Transaction Checkers If a check fails, kill all Transaction Checker processes Note use of comments in margin When is this a good idea?

Collaboration diagrams Objects are rectangular icons e.g., Order Entry Window, Order, etc. Messages are arrows between icons e.g., prepare() Numbers on messages indicate sequence Also spatial layout helps show flow Which do you prefer: sequence or collaboration diagrams? Fowler now admits he doesn’t use collaboration diagrams Interaction diagrams show flow clearly, but are awkward when modeling alternatives UML notation for control logic has changed in UML 2 but Fowler isn’t impressed