Software Design The Dynamic Model Design Sequence Diagrams

  • Slides: 29
Download presentation
Software Design The Dynamic Model Design Sequence Diagrams and Communication Diagrams Instructor: Dr. Hany

Software Design The Dynamic Model Design Sequence Diagrams and Communication Diagrams Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU

Ouline UML Development – Overview n The Requirements, Analysis, and Design Models n Static

Ouline UML Development – Overview n The Requirements, Analysis, and Design Models n Static and Dynamic Design n n Examples

UML Development - Overview ACTORS REQUIREMENTS ELICITATION USE CASES Time SCENARIOS SEQUENCE DIAGRAMS ANALYSIS

UML Development - Overview ACTORS REQUIREMENTS ELICITATION USE CASES Time SCENARIOS SEQUENCE DIAGRAMS ANALYSIS Specify Domain Objects ANALYSIS CLASS DIAGRAM(S) State. Chart DIAGRAMs OPERATION CONTRACTS Architectural Design SUBSYSTEM CLASS/ Include OR COMPONENT Design Objects DIAGRAMS DEPLOYMENT DIAGRAM DESIGN DIAGRAMS Detailed DESIGN Object Design IMPLEMENTATION CHOICES IMPLEMENTATION DESIGN SEQUENCE DIAG. OR COLLABORATION DIAG IMPLEMENTATION Activity DIAGRAMS PROGRAM D A T A D I C T I O N A R Y

The Requirements, Analysis, and Design Models Requirements Elicitation Process The Analysis Process The Design

The Requirements, Analysis, and Design Models Requirements Elicitation Process The Analysis Process The Design Process Functional/ Nonfunctional Requirements Use Case Diagrams/ Sequence Diagrams (the system level) - Analysis Class Diagrams - State Diagrams/ Static Analysis Refined Sequence Dynamic Analysis Diagrams (The object level) • Design Class Diagrams and Static Architectural Components Diagrams Design • Design Sequence Diagrams Dynamic Design • Comm. or Collab. Diagrams

Static and Dynamic Design n The Static design class diagram model is developed iteratively

Static and Dynamic Design n The Static design class diagram model is developed iteratively using the dynamic model represented in design sequence diagrams or collaboration (also called communication) diagrams Design sequence diagrams show detailed interactions between objects of classes in different subsystems They are defined based on analysis (system) sequence diagrams developed for a given Use. Case scenario defined in the analysis (or the requirements) model

Static and Dynamic Design n The development of Design Class Diagrams is completed by

Static and Dynamic Design n The development of Design Class Diagrams is completed by defining operations and classes to support the interactions represented in the dynamic model. Operations of classes in the design class diagram are defined using the dynamic interactions in the dynamic model sequence diagrams New classes might be needed in the design class diagram to support the interactions of objects in the sequence diagrams (e. g. , Interface classes, proxy classes, scheduler classes etc. )

Class Operations n n The behavior of a class is represented by its operations

Class Operations n n The behavior of a class is represented by its operations Operations may be found by examining interaction diagrams registration form registration manager Registration. Manager 3: add course(joe, math 01) add. Course(Student, Course)

Design Sequence Diagrams (UML 2) Specify operations and states on the timelines Detailed Parameters

Design Sequence Diagrams (UML 2) Specify operations and states on the timelines Detailed Parameters list can be specified during detailed design

Digital Sound Recorder: A Complete Example

Digital Sound Recorder: A Complete Example

Digital Sound Recorder: A Complete Example, Use Case Diag.

Digital Sound Recorder: A Complete Example, Use Case Diag.

The Sound Recorder Analysis Level Class Diagram

The Sound Recorder Analysis Level Class Diagram

Digital Sound Recorder: A Complete Example: Architecture The Static model, Design Class Diagram: Designing

Digital Sound Recorder: A Complete Example: Architecture The Static model, Design Class Diagram: Designing The Subsystems,

Digital Sound Recorder: A Complete Example: Design Class Diag: Class Operations Are defined Using

Digital Sound Recorder: A Complete Example: Design Class Diag: Class Operations Are defined Using Design Sequence diagrams

Digital Sound Recorder: A Complete Example

Digital Sound Recorder: A Complete Example

Digital Sound Recorder: A Complete Example: The Dynamic model DSD shows the interactions between

Digital Sound Recorder: A Complete Example: The Dynamic model DSD shows the interactions between objects in different subsysts Design Sequence Diagram

Digital Sound Recorder: A Complete Example

Digital Sound Recorder: A Complete Example

Digital Sound Recorder: A Complete Example • A Scheduler subsystem is added to provide

Digital Sound Recorder: A Complete Example • A Scheduler subsystem is added to provide interrupt Handling for timer interrupts to alert observers for synchronous tasks • Uses the observer design pattern (to be discussed later)

Digital Sound Recorder: A Complete Example: The Dynamic model n Interactions are shown using

Digital Sound Recorder: A Complete Example: The Dynamic model n Interactions are shown using a UML collaboration diagram. Timer interrupt update scenario Notice an Event. Proxy Class is added For posting Events. Uses the Proxy Desgin pattern

Digital Sound Recorder: A Complete Example: The Dynamic model n Setting the alarm clock

Digital Sound Recorder: A Complete Example: The Dynamic model n Setting the alarm clock scenario: the controller object of type Setting. Time. User. Mode is setting the Alarm. Clock object which is shown by the Clock. View object

Model-View-Controller Architecture Style • The Controller manipulates the data Model • The View retrieves

Model-View-Controller Architecture Style • The Controller manipulates the data Model • The View retrieves data from the model and displays needed information

Model-View-Controller Architecture Style Dynamic Interactions

Model-View-Controller Architecture Style Dynamic Interactions

Digital Sound Recorder: A Complete Example: The Dynamic model

Digital Sound Recorder: A Complete Example: The Dynamic model

The Banking System Example: Consolidated Collaboration (Communication) Diagrams combines static and dynamic information Obtained

The Banking System Example: Consolidated Collaboration (Communication) Diagrams combines static and dynamic information Obtained by combining Multiple scenarios of Interactions (Context Subsystem diag. ) Labeled interactions between subsystems

Labels Interactions between objects in a subsystem

Labels Interactions between objects in a subsystem

Example: Consolidated Collaboration Diagram of the Elevator Control System

Example: Consolidated Collaboration Diagram of the Elevator Control System

Peer-to-Peer Architecture Style

Peer-to-Peer Architecture Style

Peer-to-Peer Architecture Style The Gnutella Example • Pure Peer-to-Peer Architecture • A sends query

Peer-to-Peer Architecture Style The Gnutella Example • Pure Peer-to-Peer Architecture • A sends query for a data resource to neighbors B and H, they pass it on until the peer having the resource is found or until a certain threshold of hops is reached

Peer-to-Peer Architecture Style The Skype Example • A mixed client-Server and Pee-to-Peer • Skype

Peer-to-Peer Architecture Style The Skype Example • A mixed client-Server and Pee-to-Peer • Skype Peers get promoted to a supernode status based on their network connectivity And machine performance • Supernodes perform the Communication and routing of massages to establish a call • When a user logs in to the server he is connected to a supernode • If a peer becomes a supernode he unknowingly bears the cost of routing a potentially large number of calls.