Detail Design: Use-Case Design

Slides:



Advertisements
Similar presentations
Deliverable #8: Detailed Design - Overview due: Wednesday, 7 March All Deliverable materials are to be posted into Team Concert. Your to.
Advertisements

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 1 Rational Rose 2000 Interaction Diagrams.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/20 Interaction Diagrams.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
J. Scott Hawker p. 1 Material © IBM Rational Software Use-Case Analysis Analyze the requirements to discover what the system objects are These.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Interaction Diagrams.
© Copyright Eliyahu Brutman Programming Techniques Course.
Sample Analysis Model. Example: Sequence Diagram –“Richer Sample.” : Student : RegisterForCoursesForm : RegistrationController : Schedule : Student :
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
1 Detail Design Subsystem Design Static Part - VOPC.
Detail Design Subsystem Design Background and the Dynamic Part
Use Case Analysis – continued
SE 555 Software Requirements & Specification Requirements Analysis.
1 Business Models Modeling. 2 Why Model the Business Business modeling is a technique to help answer critical questions, such as: What do the workers.
Object Oriented Analysis and Design Using the UML
Object-Oriented Analysis and Design
OOAD – Dr. A. Alghamdi Mastering Object-Oriented Analysis and Design with UML Module 6: Use-Case Analysis Module 6 - Use-Case Analysis.
CS 8532: Adv. Software Eng. – Spring 2007 Dr. Hisham Haddad Tuesday Class will start momentarily. Please Stand By … CS 8532: Advanced Software.
The Design Discipline.
UML - Development Process 1 Software Development Process Using UML (2)
RUP Fundamentals - Instructor Notes
SOFTWARE ENGINEERING BIT-8 APRIL, 16,2008 Introduction to UML.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
Rational Unified Process Fundamentals Module 4: Disciplines II.
CS 3610: Software Engineering – Spring 2009 Dr. Hisham Haddad – CSIS Dept. Class Project OO Design Document Here is what you need to do for your class.
Shanghai Jiao Tong University 上海交通大学软件工程中心 Object Oriented Analysis and Design Use-Case Design.
RUP Design RUP Artifacts and Deliverables
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 11 Subsystem Design.
1 Detail Design Subsystem Design Background and the Dynamic Part.
Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 10 Use Case Design.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Systems Analysis and Design in a Changing World, 3rd Edition
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
Chapter 10 Analysis and Design Discipline. 2 Purpose The purpose is to translate the requirements into a specification that describes how to implement.
Object Oriented Analysis and Design using the UML CIS 520 Advanced Object-Oriented Design.
Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 1 Rational Rose 2000 Class Diagrams.
1 IBM Software Group ® Mastering Object-Oriented Analysis and Design with UML 2.0 Module 6: Use-Case Analysis.
CS 4850: Senior Project Fall 2014 Object-Oriented Design.
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
ANALYSIS - II REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
1 Detail Design: Use-Case Design Background on Use Case Design Have ‘done’ Architectural Design; You know the major (eleven) precepts of good design.
TAL7011 – Lecture 4 UML for Architecture Modeling.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
1 The Unified Modeling Language. 2 The Unified Modeling Language (UML) is a standard language for writing software blueprints. The UML may be used to.
Database Design Some of these slides are derived from IBM/Rational slides from courses on UML and object-oriented design and analysis. Copyright to the.
Introduction to OOAD and the UML
1 IBM Software Group ® Mastering Object-Oriented Analysis and Design with UML 2.0 Module 9: Describe the Run-time Architecture.
1 IBM Software Group ® Essentials of Visual Modeling with UML 2.0 Module 5: Interaction Diagrams.
OOAD Using the UML - Subsystem Design, v 4.0 Copyright  Rational Software, all rights reserved 1 R Subsystem Design.
Object Oriented Analysis and Design using the UML Use-Case Analysis Adapted by Dr. Spiegel from Slides Provided by Rational Software.
Analysis Yaodong Bi. Introduction to Analysis Purposes of Analysis – Resolve issues related to interference, concurrency, and conflicts among use cases.
Rational Unified Process Fundamentals Module 3: Core Workflows I - Concepts Rational Unified Process Fundamentals Module 3: Core Workflows I - Concepts.
UML - Development Process 1 Software Development Process Using UML.
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
Homework #8 - Deliverable 5 due: 2 December 1. Exec Summary 2. Revisit Use Cases 3. The Analysis Model Class Diagrams Interaction Diagrams 4. Non-Functional.
CSIS 4850: CS Senior Project – Spring 2009 CSIS 4850: Senior Project Spring 2009 Object-Oriented Design.
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Use Case Analysis – continued Control Classes.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Use Case Analysis – Part 4 Analysis Mechanisms.
GOVT. ENGINEERING COLLEGE, AJMER. A SEMINAR PRESENTATION ON UNIFIED MODELING LANGUAGE(UML) SUBMITTED TO:-PRESENTED BY:- Dr. REENA DADHICHPALLAVI VASHISTHA.
Unified Modeling Language
UML dynamic Modeling (Behavior Diagram)
The Unified Modeling Language
Design Yaodong Bi.
Use-Case Design in Context
Use Case Analysis – continued
Software Development Process Using UML Recap
Presentation transcript:

Detail Design: Use-Case Design OOADv4.2 Instructor Notes Detail Design: Use-Case Design Module 11 - Use-Case Design

Background on Use Case Design Have ‘done’ architectural design; need to do three more types of design – each have a specific purpose: Use case design; Subsystem design, and Class design.

Use Case Design Use Case Design is a cross-checking, consistency-imposing activity that is focuses on the ‘use-case thread’ to make sure everything still fits together. Part of what we do is to continually review interaction diagrams looking for inconsistencies, missing information, opportunities for reuse, etc. Interaction diagrams: collaboration diagrams; sequence diagrams. Check to ensure we have operations for the whole path of the flow of events – easy to forget an operation here and there. Equivalently, are all collaborating objects and their responsibilities ‘in place’ (or add now…) to accommodate the functionality captured in the use case path?

Objectives: Use-Case Design OOADv4.2 Instructor Notes Objectives: Use-Case Design Start of ‘Detail Design’ – right above coding. Verify that there is consistency in the use-case implementation: 1. Verify that all necessary behaviors to support a ‘use case implementation’ have been distributed along the participating classes, 2. Verify that all associations between design elements (classes and subsystems) needed for the use case realizations have been defined, 3. Verify that all of the attributes needed for the use cases have been defined. Use-Case Design is a cross-checking, consistency-imposing activity, focused on the “use-case thread” to make sure everything still fits together. Part of this activity involves continually reviewing the interaction diagrams, looking for inconsistencies, missing information, opportunities for re-use, etc. We want to check that we have operations for the whole path of the flow of events. It is not easy to find holes - places where someone have forgotten to create operations -- just by looking at the design model. Module 11 - Use-Case Design

Objectives: Use-Case Design (cont) 4. Refine the use-case realizations from Use-Case Analysis (we did not develop use case realizations during analysis) using defined design model elements (design classes and subsystems that the analysis classes ‘morphed into’). 5. Ensure application architectural mechanisms (persistence, security, etc.) is incorporated into the use case realizations.

Use-Case Design in Context OOADv4.2 Instructor Notes Use-Case Design in Context The focus during Use-Case Design, as in Use-Case Analysis, is on a specific use case rather than “the big picture”, which is the focus of the Architect activities. Use-Case Design is where you refine the use case realizations initially defined in Use Case Analysis. Instead of analysis classes, you will now describe the use case realizations in terms of design subsystems and classes. The difference between Use-Case Analysis and Use-Case Design is scale. Analysis classes are quite large (this keeps the analysis model small). This means that analysis diagrams are quite easy to read and understand and most of the team will grasp the whole model. Use-Case Design focuses on the externally visible behaviors of the classes and subsystems; the class and subsystem design activities are concerned with making sure that the “insides” of the class and subsystems correctly implement the publicly visible behaviors. Architectural Analysis Architectural Describe Review the Describe Architecture Architecture Architect Design Concurrency Distribution Reviewer Subsystem Design Use-Case Analysis Review the Use-Case Design Design Designer Design Reviewer Class Design Here is our workflow from the Rational Unified Process. We have defined the architecture (first cut) and defined major elements in our system (subsystems, their interfaces, design classes and some processes and threads and their relationships Note ‘designer’ activities are related to architecture - but yet quite different Module 11 - Use-Case Design

Use Case Design Have a cut at an architectural baseline (design). Let’s go into detail design: Preliminary thoughts: Use-Case Design is also where the design elements (design classes and subsystems) meet the architectural mechanisms. In our use case realizations (in particular, the sequence diagrams) we will need to incorporate persistence, security, etc. activities with the other design elements. Important to note that the detailed design activities (Use Case Design, Subsystem Design, and Class Design) are tightly bound and tend to alternate between one another.

Lastly, Please note that one of the major differences between use case analysis and use case design is scale. Analysis classes are quite large - this keeps the analysis model small. This means that analysis diagrams are quite easy to read and understand and most of the team will grasp the whole model. Use Case Design Steps Describe Interactions Between Design Objects Simplify Interaction Diagrams Using Subsystems (optional) Focus is on the Use Case and this includes crossing subsystem boundaries.

Use-Case Design Overview OOADv4.2 Instructor Notes Use-Case Design Overview Supplementary Specifications It is important to describe that there are different Designers (or Design teams) on a project, each with different focus. Use-Case Designers are concerned with the design of the use-case realizations for a particular use case, coordinating with the necessary architects, subsystem designers and class designers. The use-case designer concentrates on the interactions between subsystems and “free” (not contained in subsystem) classes. They can defer responsibility for what happens inside the subsystems to the subsystem designer(s). That’s the beauty of encapsulation Be careful with the discussion of project team organization, as you don’t want the discussion to turn into a discussion of OO project management concerns. Refer the students to the OOPM course for more details on team organization. Design Subsystems and Interfaces Use-Case Design Use-Case Realization Use-Case Realization Use Case Design Classes Module 11 - Use-Case Design

Use-Case Realization – UML Notation OOADv4.2 Instructor Notes Use-Case Realization – UML Notation Use-Case Model Design Model For details on how to model use-case realizations in Rose, see the instructor notes for this slide in Use-Case Analysis. Use Case Use-Case Realization Interaction Diagrams: Use Case Realization: Sequence Diagrams Collaboration Diagrams Class Diagrams Use Case Designer is responsible for the integrity of the Use Case realization. Must coordinate. Module 11 - Use-Case Design

OOADv4.2 Instructor Notes Use-Case Design Steps  Describe Interactions Between Design Objects This involves replacing analysis classes with the design elements that they were refined into during Architectural Design as well as incorporating any applicable architectural mechanisms. Replace boundary classes with subsystems; external actors, such as for an external device or database, with its interface; a number of analysis entities may prevail, although perhaps be smaller or adjusted. Simplify Interaction Diagrams Using Subsystems (optional) (Lecture 32.) Describe Persistence-Related Behavior Refine the Flow of Events Description Unify Classes and Subsystems Module 11 - Use-Case Design

For Each Use-Case Realization OOADv4.2 Instructor Notes For Each Use-Case Realization You are essentially taking the use-case realization diagrams developed in Use-Case Analysis and re-drawing them, using the design elements that the analysis classes were refined into, making sure that the responsibility allocation is still accurate. Collaboration or sequence diagrams may be used to model these interactions. RUP recommends that sequence diagrams be used during design. In the early stages of design, some operations may not be defined, so you may have to leave this information out and give the message a temporary name; such messages are said to be "unassigned." Later, when you have found the participating objects' operations, you should update the interaction diagram by ”mapping" the messages to these operations. In the dynamic part of the Use Case Realization – using collaboration or sequence diagrams: Identify participating objects needed in the flow of events. May be instances of design classes and subsystems, or they may be instances of actors that the participating objects interact with. Allocate responsibilities among objects (should have this done) Model messages between objects – either operations in design classes or operations in the interface to a subsystem. This means to construct the message arrow in the sequence diagram. Describe processing resulting from messages Attach a script to object describing what it does when it receives a message. In the static part of the Use Case Realization: Model associated class relationships that support the collaborations modeled in the interaction diagrams Module 11 - Use-Case Design

Use-Case Realization – Dynamic Modeling (Interaction Diagrams) OOADv4.2 Instructor Notes Use-Case Realization – Dynamic Modeling (Interaction Diagrams) Look at the Interaction Diagrams…Replace applicable classes with the associated subsystem interfaces (but no HOWs) Incrementally incorporate applicable architectural mechanisms – using patterns of behavior defined for the mechanisms in architectural activities. This may include the introduction of new design elements and messages. Update use-case realization – both static and dynamic parts: Interaction diagrams (sequence / collaboration diagrams) View of participating classes (VOPC) class diagram(s) Note: On the presented slide, the items that were added/utilized as part of incorporating the subsystem interface are shown in yellow, but this does not show up in the back-and-white manuals. Module 11 - Use-Case Design

Ex: Incorporating Subsystem Interfaces OOADv4.2 Instructor Notes Ex: Incorporating Subsystem Interfaces BillingSystem // submit bill() <<boundary>> <<subsystem>> IBillingSystem CourseCatalogSystem // get course offerings() ICourseCatalogSystem Analysis Classes Design Elements Emphasize the rationale for choosing these subsystems -- external system access. In Rose, you cannot draw a realization relationship from a subsystem (a.k.a. package) to an interface. See Modeling Design Subsystems slide instructor notes for a description of a workaround. submitBill(forTuition : Double, forStudent : Student) getCourseOfferings(forSemester : Semester) : CourseOfferingList Recall: we determined that interactions to support external system access will be more complex than can be implemented in a single class. So, we identified subsystems to encapsulate this access to external systems. Some analysis classes mapped directly to design classes in the Design Model Module 11 - Use-Case Design

Ex: Incorporating Subsystem Interfaces (before) OOADv4.2 Instructor Notes Ex: Incorporating Subsystem Interfaces (before) Replace with subsystem interface : Student : RegisterForCoursesForm : RegistrationController : Schedule : CourseCatalogSystem A list of the available course offerings for this semester are displayed Student wishes to create a new schedule 1. // create schedule( ) 1.2. // display course offerings( ) 1.1. // get course offerings( ) 1.1.1. // get course offerings(forSemester) 1.3. // display blank schedule( ) 2. // select 4 primary and 2 alternate offerings( ) 2.1. // create schedule with offerings( ) 2.1.1. // create with offerings( ) A blank schedule is displayed for the students to select offerings 2.1.2. // add schedule(Schedule) At this point, the Submit Schedule subflow is executed We know from Architectural Design that a CourseCatalogSystem subsystem has been defined to encapsulate access to the external legacy Course Catalog System. So, we need to refine interaction diagram and replace the CourseCatalogSystem boundary class with the associated subsystem interface, ICourseCatalogSystem. Module 11 - Use-Case Design

Ex: Incorporating Subsystem Interfaces (after) OOADv4.2 Instructor Notes Ex: Incorporating Subsystem Interfaces (after) Replaced with subsystem interface Note: On the presented slide, the items that were added/utilized as part of incorporating the subsystem interface are shown in yellow, but this does not show up in the back-and-white manuals. : RegisterFor CoursesForm : Registration Controller : ICourseCatalog System : Schedule : Student : Student 1: // create schedule( ) 1.1: // get course offerings( ) Student wishes to create a new 1.1.1: getCourseOfferings(Semester) schedule 1.2: // display course offerings( ) Show here how interactions are modeled between design elements where one element is a subsystem. Original use-case realization was refined and original boundary class replaced with the associated subsystem interface, ICourseCatalogSystem A list of the available course offerings for this semester are displayed A blank schedule 1.3: // display blank schedule( ) is displayed for the students to select offerings 2: // select 4 primary and 2 alternate offerings( ) 2.1: // create schedule with offerings( ) 2.1.1: // create with offerings( ) 2.1.2: // add schedule(Schedule) At this, point the Submit Schedule subflow is executed. Module 11 - Use-Case Design

More on interaction diagrams – in some cases from analysis In Use Case Design, we will not flush out the internals of the CourseCatalogSystem subsystem. This diagram will become the subsystem context diagram in Subsystem Design. In Subsystem Design we will concentrate on the internals of the subsystem.

Ex: Incorporating Subsystem Interfaces - (VOPC) OOADv4.2 Instructor Notes Ex: Incorporating Subsystem Interfaces - (VOPC) Subsystem interface <<Interface>> ICourseCatalogSystem Note: On the presented slide, the items that were added/utilized as part of incorporating the subsystem interface are shown in yellow, but this does not show up in the back-and-white manuals. <<boundary>> (from External System Interfaces) RegisterForCoursesForm <<control>> 1 (from Registration) RegistrationController 0..* getCourseOfferings() (from Registration) initialize() // submit schedule() // display course offerings() <<entity>> // display schedule() 1 1 // submit schedule() // save schedule() Schedule // save schedule() // create schedule with offerings() currentSchedule 0..1 (from University Artifacts) // create schedule() // getCourseOfferings() semester // select 4 primary and 2 alternate offerings() // display blank schedule() 0..1 0..1 // submit() registrant // save() 0..1 0..* // any conflicts?() <<entity>> // new() Student. 0..* 0..* (from University Artifacts) - name - address 1 alternateCourses - studentID : int 0..2 primaryCourses <<entity>> // addSchedule() 0..4 CourseOffering // getSchedule() (from University Artifacts) // hasPrerequisites() number // passed() startTime Static part: endTime days The above example is the VOPC after incorporating the design elements. The original CourseCatalogSystem boundary class has been replaced with the associated subsystem interface, ICourseCatalogSystem. // addStudent() // removeStudent() // new() // setData() Module 11 - Use-Case Design

Incorporating Architectural Mechanisms: Security OOADv4.2 Instructor Notes Incorporating Architectural Mechanisms: Security Analysis-Class-to-Architectural-Mechanism Map from Use-Case Analysis Emphasize to the students that you will not be covering the incorporation of the security mechanism; however, the details can be found in the appendix. If you choose to present the security mechanism, the slides found in the Additional Information appendix, Security Mechanism section, second part, should be inserted after this slide. Note: On the presented slide, the italicized text is also yellow, but this does not show up in the back-and-white manuals. Analysis Class Analysis Mechanism(s) Student Persistency, Security Schedule Persistency, Security CourseOffering Persistency, Legacy Interface Course Persistency, Legacy Interface RegistrationController Distribution In Use Case Analysis, applicable mechanisms for each identified analysis class were considered (should be documented too). This info, along with the information on what analysis classes became what design elements allows the applicable mechanisms for a design element to be identified. Above only concentrates on the course registration in our examples – these are the only classes that have analysis mechanisms assigned to them. Module 11 - Use-Case Design

OOADv4.2 Instructor Notes Analysis-Class-to-Architectural-Mechanism Map from Use-Case Analysis Emphasize to the students that you will not be covering the incorporation of the RMI mechanism; however, the details can be found in the appendix. If you choose to present the distribution (RMI) mechanism, the slides found in the Additional Information appendix, RMI Mechanism section, second part, should be inserted after this slide. Note: On the presented slide, the italicized text is also yellow, but this does not show up in the back-and-white manuals. Analysis Class Analysis Mechanism(s) Student Persistency, Security Schedule Persistency, Security CourseOffering Persistency, Legacy Interface Course Persistency, Legacy Interface RegistrationController Distribution The details of incorporating the distribution (RMI) mechanism will be provided in the future. So will the Security Mechanism (for our Course Registration System application Details in Appendix Module 11 - Use-Case Design

Use-Case Design Steps - continued OOADv4.2 Instructor Notes Use-Case Design Steps - continued Describe Interactions Between Design Objects Simplify Interaction Diagrams Using Subsystems (optional) When a use case is realized, the flow of events is usually described in terms of executing objects; that is, as interactions between design objects. It may be useful to encapsulate a sub-flow of events within a subsystem. If done, large subsections of the interaction diagram are replaced with a single message to the subsystem. Within the subsystem, a separate interaction diagram may illustrate the internal interactions within the subsystem that provides the required behavior. These subsystem interaction diagrams are developed during Subsystem Design. Describe Persistence-Related Behavior Refine the Flow of Events Description Unify Classes and Subsystems The RUP step is “Simplify Sequence Diagrams Using Subsystems (optional)”. We have used “interaction” instead because we did not want to constrain the designer. Module 11 - Use-Case Design

Encapsulating Subsystem Interactions OOADv4.2 Instructor Notes Encapsulating Subsystem Interactions Interactions can be described at several levels Lifelines in the middle represent sub-states; Interactions in circles represent the internal interaction of subsystem members in response to the message. Subsystem interactions can be described in their own interaction diagrams Raises the level of abstraction Module 11 - Use-Case Design

When to Encapsulate Sub-Flows in a Subsystem OOADv4.2 Instructor Notes When to Encapsulate Sub-Flows in a Subsystem Sub-flow occurs in multiple use-case realizations Sub-flow occurs only in one use case realization, but: Sub-flow has reuse potential Sub-flow is complex and easily encapsulated Sub-flow is responsibility of one person/team Sub-flow produces a well-defined result Sub-flow is encapsulated within a single Implementation Model component Make sure what you are abstracting is worth abstracting. There’s no free lunch! This slide lists those instances when sub-sequences of messages (a.k.a. subflows) within interaction diagrams should be encapsulated within a subsystem. Sometimes you see repeated patterns of interaction in these early use-case realizations that give birth to new subsystems and some revisions in the use-case realizations. It is important for the Architect to look within and across subsystems for common behavior (i.e., common collaborations) within the subsystems, pulling it out where possible. This is a reuse scavenging activity that falls under the Architectural Design umbrella. The subflow encapsulated within the subsystem becomes a behavior of the subsystem and should be defined in an interface that the subsystem realizes. Existing dependencies will need to be adjusted to support the new/refined interface. Adjustment/refinement of subsystem interfaces and dependencies is an “Architectural Design” activity and should be performed by the Architect. The modeling of the collaborations within a subsystem is a “Subsystem Design’ activity and should be performed by the Subsystem Designer” Module 11 - Use-Case Design

Guidelines: Encapsulating Subsystem Interactions OOADv4.2 Instructor Notes Guidelines: Encapsulating Subsystem Interactions Subsystems should be represented ONLY by their interfaces on interaction diagrams Otherwise other diagrams would have to be changed whenever subsystems are substituted Messages to subsystems are modeled as messages to the subsystem interface Thus any subsystem that realizes the interface can be substituted for the interface in diagram. <<subsystem>> MySubsystem InterfaceA op1() Op1() :InterfaceA Module 11 - Use-Case Design

Guidelines: Messages Going OUT From Interfaces… Messages to subsystems correspond to operations of the subsystem interface Interactions within subsystems will be modeled in Subsystem Design In many cases, the interface lifeline does not have messages going out from it, since different subsystems realizing the interface may send different messages. However, if you want to describe what messages should be sent (or are allowed to be sent) from any subsystem realizing the interface, such messages can go out from the interface lifeline.

Principle: Design by Contract With this approach, when describing the interactions, the focus remains focused on the services, NOT on how the services are implemented within the design elements. This is known as “Design by Contract” and is one of the core tenets of robust software development using abstraction and encapsulation mechanisms. Describing HOW the services are implemented is the focus of Subsystem Design (for the design subsystems) and Class Design (for the design classes).

Advantages of Encapsulating Subsystem Interactions OOADv4.2 Instructor Notes Advantages of Encapsulating Subsystem Interactions Parallel subsystem development is discussed in more detail on the next slide. Use-case realizations are less cluttered – especially if the internal design of subsystem in complex. Use-case realizations can be created before the internal designs of subsystems are created (parallel development) Ensures the use case functionality hasn’t been lost between allocation of use-case responsibility (in Use Case Analysis) and the identification of design elements (subsystems and design classes) in Architectural Design, and before Subsystem Design is performed. Use-case realizations are more generic and easy to change (subsystems can be substituted) Again, encapsulating subsystem interactions raises the level of abstraction of the use-case realization flows of events. Module 11 - Use-Case Design

Parallel Subsystem Development OOADv4.2 Instructor Notes Parallel Subsystem Development This is critical information. It really describes parallel software development, which is enabled via the establishment of a well-defined and stable architecture. Note: This discussion holds true for packages if you substitute “public classes” for “interfaces”. That being said, anytime you find yourself wanting to define packages with some public classes and mostly implementation classes, you may want to consider using a subsystem instead -- more robust modeling technique (no dependencies on anything inside subsystem). IF we are developing subsystems more or less independently, first find subsystem dependencies by identifying the interfaces between them. How? Approach: Concentrate on requirements that affect subsystem interfaces Outline required interfaces Show messages that are going to pass over the subsystem borders… Draw interaction diagrams in terms of subsystem interfaces for each use case Refine the interfaces needed to provide messages Develop each subsystem in parallel – using the interfaces as synchronization instruments between development teams. Module 11 - Use-Case Design

Parallel Subsystem Development May decide to arrange the interaction diagrams in term of subsystems or in terms of their interfaces only. In some projects, it might even be necessary to implement the classes providing the interfaces before you continue with the rest of the modeling. The detailed design of the subsystem “internals” is done during Subsystem Design. The interfaces are what ensure compatibility between the Use-Case Design and the Subsystem Design.