Interaction Diagram Notation From Chapter 15 of Craig Larman, Applying UML and Patterns John Dalesandro.

Slides:



Advertisements
Similar presentations
Object-Oriented Analysis and Design CHAPTERS 15: UML INTERACTION DIAGRAMS 1.
Advertisements

© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Chapter 1 Object Oriented Analysis and Design. UML, Patterns, and Object-Oriented Analysis and Design  The essential skills for the creation of well-designed,
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Drawing System Sequence Diagrams
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
© 2005 Prentice Hall8-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
Dynamic modeling using UML
NJIT Drawing System Sequence Diagrams Chapter 10 Applying UML and Patterns Craig Larman Presented by Anuradha Dharani.
Lab 6 CPIT 250 System Analysis and Design.
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
SEQUENCE DIAGRAM Prepared by: T. Fatimah Alageel.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
CS3773 Software Engineering
Interactions. 2 Objects communicate with each other by sending messages. Sending a message is another name for a member function call. –Some C++ examples.
Class, Sequence and UML Model.  Has actors and use cases.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Interaction diagrams Sequence and collaboration diagrams.
1 On to Object Design Chapter 14 Applying UML and Patterns.
Object-Oriented Analysis and Design An Introduction.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 9: Interaction.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Copyright © Hsiao-Lan Wei All Rights Reserved Design Model Interaction diagram.
Starting Object Design
Chapter 4: UML Interaction Diagrams. Objective Provide a reference for frequently used UML interaction diagram notation- sequence and communication diagrams.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 15 System Modeling with the UML.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
What to remember from Chap 13 (Logical architecture)
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
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.
Interaction Diagram Notation
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour UML Sequence Diagram.
Object-Oriented Analysis and Design 1 Mira Balaban & Arnon Sturm Object-Oriented Analysis and Design Session 3a: Behavioral Modeling - Interactions.
COMP-350 Object-Oriented Analysis and Design Drawing System Sequence Diagrams Reference: Larman, Chapter 9.
1 On To Object Design Chapter 14 Applying UML and Patterns -Craig Larman.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Collaboration diagrams. Purpose A collaboration diagram is an alternate way to show a scenario. A collaboration diagram shows the objects and relationships.
Systems Analysis and Design in a Changing World, Fourth Edition
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Chapter 3: Introducing the UML
Communication Diagrams Lecture 8. Introduction  Interaction Diagrams are used to model system dynamics  How do objects change state?  How do objects.
Appendix Object-Oriented Analysis and Design: Use Cases and Sequence Diagrams Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F.
Dr. Kivanc DincerCS319 Week 6 - Oct.17,20051 Chapter 14 Onto Object Design Objectives Understand dynamic and static object design modeling. Try agile modeling,
Unified Modeling Language. What is UML? Standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems,
Project 2: Phase 1 Submission 7 Late submissions 10% 10 No submissions 14% Better than project 1 phase 3 submissions 10-point bonus: If you catch the deadline.
Interactions.
UML Interaction Diagrams
UML Modeling Sequence diagram
Sequence Diagrams.
Chapter 11: Collaboration Diagram - PART1
Object-Oriented Systems Analysis and Design Using UML
Sequence Diagram.
Communication DIAGRAM
DESIGN MODEL: USE-CASE REALIZATIONS WITH GRASP PATTERNS
Sequence Diagrams.
Sequence Diagrams.
Requirements To Design In This Iteration
IMAT5205 Systems Analysis and Design
Interaction diagrams.
Unified Modelling Language
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
UML Interaction diagrams
Communication DIAGRAM
CIS 375 Bruce R. Maxim UM-Dearborn
UML Interaction Diagrams
Chapter 4 Sequence Diagrams
Presentation transcript:

Interaction Diagram Notation From Chapter 15 of Craig Larman, Applying UML and Patterns John Dalesandro

Objectives Read basic UML Interaction (Communication and Sequence) Diagram notation

Decomposition Tools Different styles of software development are often characterized by a strong reliance on a particular modeling tool during the design phase. Relational Database designers tend to depend heavily on Entity Relationship Diagrams. Functional/Procedural designers may use a tool like Function Decomposition Diagrams. eXtreme Programming designers often use Class Responsibility Collaboration Cards.

Object-Oriented Decomposition The modeling genre of choice for most object-oriented designers is the Unified Modeling Language. The most important activity in object-oriented design is assigning responsibility to objects. The preferred tool to assist object-oriented designers in assigning responsibility to objects are the two UML interaction diagrams.

Introduction Why do objects exist? –To perform an activity to help fulfill a system’s purpose Interaction Diagrams are used to model system dynamics –How do objects change state? –How do objects interact (message passing)?

Communication & Sequence Diagrams An Interaction Diagram is a generalization of two specialized UML diagram types –Communication Diagrams: Illustrate object interactions organized around the objects and their links to each other –Sequence Diagrams: Illustrate object interactions arranged in time sequence

Communication & Sequence Diagrams (2) Both diagram types are semantically equivalent, however, they may not show the same information –Communication Diagrams emphasize the structural organization of objects, while Sequence Diagrams emphasize the time ordering of messages –Communication Diagrams explicitly show object linkages, while links are implied in Sequence Diagrams

Interaction Diagrams Are Valuable Interaction Diagrams provide a thoughtful, cohesive, common starting point for inspiration during programming Patterns, principles, and idioms can be applied to improve the quality of the Interaction Diagrams

Common Interaction Diagram Notation

Communication Diagrams Objects are connected with numbered (sequenced) arrows along links to depict information flow Arrows are drawn from the interaction source The object pointed to by the arrow is referred to as the target Arrows are numbered to depict their usage order within the scenario Arrows are labeled with the passed message

Example Communication Diagram

Example Communication Diagram: makePayment

Basic Communication Diagram Notation Link - connection path between two objects (an instance of an association) Message - represented with a message expression on an arrowed line between objects Sequence Number - represents the order in which the flows are used

Basic Communication Diagram Notation (2) Conditional Message –Seq. Number [ variable = value ] : message() –Message is sent only if clause evaluates to true Iteration (Looping) –Seq. Number * [ i := 1..N ]: message() –“*” is required; [... ] clause is optional

Communication Diagram from AgileModeling.com

Sequence Diagrams Correspond to one scenario within a Use Case Model a single operation within a System over time Identify the objects involved with each scenario Identify the passed messages and actions that occur during a scenario Identify the required response of each action

Example Sequence Diagram

Example Sequence Diagram: make Payment

Basic Sequence Diagram Notation Links - Sequence Diagrams do not show links Message - represented with a message expression on an arrowed line between objects

Basic Sequence Diagram Notation (2) Object Lifeline - the vertical dashed line underneath an object –Objects do not have a lifeline until they are created –The end of an object’s life is marked with an “X” at the end of the lifeline –Passage of time is from top to bottom of diagram

Basic Sequence Diagram Notation (3) Activation - the period of time an object is handling a message (box along lifeline) –Activation boxes can be overlaid to depict an object invoking another method on itself

Basic Sequence Diagram Notation (4) Conditional Message –[ variable = value ] message() –Message is sent only if clause evaluates to true Iteration (Looping) –* [ i := 1..N ]: message() –“*” is required; [... ] clause is optional

Sequence Diagram from AgileModeling.com

Sequence Diagramming with Ideogramic Modeling Tool

Sequence Diagram for Java Remote Method Invocation t.pdf

Interaction Diagram Strengths Communication Diagram –Space Economical - flexibility to add new objects in two dimensions –Better to illustrate complex branching, iteration, and concurrent behavior Sequence Diagram –Clearly shows sequence or time ordering of messages –Simple notation

Interaction Diagram Weaknesses Communication Diagram –Difficult to see sequence of messages –More complex notation Sequence Diagram –Forced to extend to the right when adding new objects; consumes horizontal space

Conclusions Beginners in UML often emphasize Class Diagrams. Interaction Diagrams usually deserve more attention. There is no rule about which diagram to use. Both are often used to emphasize the flexibility in choice and to reinforce the logic of the operation. Some tools can convert one to the other automatically.