1 Detail Design Subsystem Design Background and the Dynamic Part.

Slides:



Advertisements
Similar presentations
Chapter 11 Component-Level Design
Advertisements

Deliverable #8: Detailed Design - Overview due: Wednesday, 7 March All Deliverable materials are to be posted into Team Concert. Your to.
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/18 Use Case Analysis – continued Control Classes.
Object Oriented Analysis and Design Using the UML
The Unified Software Development Process - Workflows Ivar Jacobson, Grady Booch, James Rumbaugh Addison Wesley, 1999.
CSCI 639 Topics in Software Engineering Assignment #5 Fall 2008.
© 2005 Prentice Hall8-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Interaction Diagrams.
CREATING THE DESIGN: THE LOGICAL VIEW The Class Diagram.
Detail Design: Use-Case Design
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
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
Object Oriented Analysis and Design Using the UML
An Introduction to Rational Rose Real-Time
Object-Oriented Analysis and Design
The chapter will address the following questions:
OOAD – Dr. A. Alghamdi Mastering Object-Oriented Analysis and Design with UML Module 6: Use-Case Analysis Module 6 - Use-Case Analysis.
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
The Design Discipline.
Systems Analysis and Design in a Changing World, Fifth Edition
OOAD Using the UML - Architectural Design, v 4.2 Copyright  Rational Software, all rights reserved 34 Object Oriented Analysis and Design Using.
Shanghai Jiao Tong University 上海交通大学软件工程中心 Object Oriented Analysis and Design Use-Case Design.
12 Systems Analysis and Design in a Changing World, Fifth Edition.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 11 Subsystem Design.
1 ITEC 3010 “Systems Analysis and Design, I” LECTURE 10: Use Case Realizations [Prof. Peter Khaiter]
10/12/ Recall The Team Skills 1. Analyzing the Problem (with 5 steps) 2. Understanding User and Stakeholder Needs 1. Interviews & questionnaires.
1 Software Design Reference: Software Engineering, by Ian Sommerville, Ch. 12 & 13, 5 th edition and Ch. 10, 6 th edition.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 10 Use Case Design.
1 Software Design Overview Reference: Software Engineering, by Ian Sommerville, Ch. 12 & 13.
1 IBM Software Group ® Mastering Object-Oriented Analysis and Design with UML 2.0 Module 8: Identify Design Mechanisms.
JDBC Java and Databases. RHS – SOC 2 JDBC JDBC – Java DataBase Connectivity An API (i.e. a set of classes and methods), for working with databases in.
Systems Analysis and Design in a Changing World, 3rd Edition
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
GRASP: Designing Objects with Responsibilities
2 Object-Oriented Analysis and Design and the Unified Process Objectives  Explain the purpose and objectives of object- oriented design  Develop design.
Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 1 Rational Rose 2000 Class Diagrams.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
1 IBM Software Group ® Mastering Object-Oriented Analysis and Design with UML 2.0 Module 6: Use-Case Analysis.
A Use Case Primer 1. The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers.
1 Detail Design: Use-Case Design Background on Use Case Design Have ‘done’ Architectural Design; You know the major (eleven) precepts of good design.
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 Design Jerry KotubaSYST Object Oriented Methodologies1.
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.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
Part VII: Design Continuous
Relationships Relationships between objects and between classes.
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.
1 Class Diagrams. 2 Overview Class diagrams are the most commonly used diagrams in UML. Class diagrams are for visualizing, specifying and documenting.
1 IBM Software Group ® Mastering Object-Oriented Analysis and Design with UML 2.0 Module 9: Describe the Run-time Architecture.
OOAD Using the UML - Subsystem Design, v 4.0 Copyright  Rational Software, all rights reserved 1 R Subsystem Design.
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
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.
UML - Development Process 1 Software Development Process Using UML.
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.
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
Project Deliverables CIS 4328 – Senior Project 2 And CEN Engineering of Software 2.
Kyung Hee University Class Diagramming Notation OOSD 담당조교 석사과정 이정환.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Use Case Analysis – continued Control Classes.
A service Oriented Architecture & Web Service Technology.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Use Case Analysis – Part 4 Analysis Mechanisms.
Component-Level Design
The Unified Modeling Language
Design Yaodong Bi.
Use Case Analysis – continued
Presentation transcript:

1 Detail Design Subsystem Design Background and the Dynamic Part

2 Objectives: Subsystem Design Understand the purpose of Subsystem Design and where in the lifecycle it is performed  Define the behaviors specified in the subsystem's interfaces in terms of collaborations of contained classes (mentioned in Use Case Design)  Document internal structure of the subsystem  Determine the dependencies upon elements external to the subsystem that may be needed to support the responsibilities of the interface.

3 Subsystem Design in Context in the UP Architect Designer Architectural Analysis Architecture Reviewer Review the Design Review the Architecture Use-Case Analysis Architectural Design Describe Concurrency Describe Distribution Class Design Subsystem Design Use-Case Design Reviewer At this time in our Design, we have defined classes, subsystems, their interfaces, and their dependencies. Have looked at components or sub-systems, i.e., ‘containers’ of complex behavior that we have treated as a black box. Now we need to flesh out the internal interactions, i.e., what classes exist in the subsystem and how do they collaborate to support responsibilities documented in the subsystem interfaces. This is what subsystem design is all about.

4 Subsystem Design in Context Architect Designer Architectural Analysis Architecture Reviewer Review the Design Review the Architecture Use-Case Analysis Architectural Design Describe Concurrency Describe Distribution Class Design Subsystem Design Use-Case Design Reviewer Here in subsystem design: We look at: 1) the detailed responsibilities of the subsystem and define and refine the classes needed to implement responsibilities, while 2) refining subsystem dependencies as needed. The internal interactions are expressed as collaborations of classes and possibly other components or subsystems. The focus is on the subsystem. The activity is iterative and recursive, but eventually feeds Class Design.

5 Subsystem Design Overview Subsystem Design Use-Case Realization (updated) Design Subsystems and Interfaces (updated) Design Classes Design Guidelines Subsystem Design is performed once per Design Subsystem. Purpose: to define the behaviors specified in the interface via its contained classes: to document the internal structure of the subsystem, to define realizations between subsystem’s interface(s) and contained classes, & to determine the dependencies upon other subsystems.

6 Subsystem is a “cross between” a package and a class  Has semantics of a package (i.e., can contain other model elements)  and a class (has behavior). Subsystem realizes one or more interfaces which define its behaviors > Subsystem Name InterfaceSubsystem > Subsystem Name Interface Realization (Canonical form) Realization (Elided form) > Interface Review: Subsystems and Interfaces

7 An interface is a model element which defines a set of behaviors (set of operations) offered by a classifier model element (e.g., class, subsystem or component).  A classifier may realize one or more interfaces.  An interface may be realized by one or more classifiers. > Subsystem Name InterfaceSubsystem > Subsystem Name Interface Realization (Canonical form) Realization (Elided form) > Interface Review: Subsystems and Interfaces

8 Interfaces are not classes; provide no default behavior. Realization is a semantic relationship between two classifiers – one serves as contract (the interface ‘class’) ; other, carries it out that is ‘realizes’ the contract.  via its subsystem contents and its dependencies > Subsystem Name InterfaceSubsystem > Subsystem Name Interface Realization (Canonical form) Realization (Elided form) > Interface Review: Subsystems and Interfaces

9 Key is abstraction and encapsulation A > B C Subsystem Guidelines Goals  Loose coupling; as independent as possible  Insulation from change - minimized  Replaceable elements in the model. Strong Suggestions for Subsystems:  Don’t expose details, only the interfaces  No element contained by a subsystem should have public visibility.  No element outside the subsystem should depend on a particular element inside the subsystem.  Only depend on interfaces of other model elements so that it is not directly dependent on any specific model element outside the subsystem.

10 Key is abstraction and encapsulation A > B C Subsystem Guidelines Exception: can share some class definitions done with packages in lower layers to ensure common definition of classes which must pass between subsystems All dependencies on a subsystem should be dependencies on the subsystem interfaces only!!  clients not dependent on inside!  subsystem can be replaced by different subsystem that realizes same interface.

11 Modeling Convention for Subsystems and Interfaces ICourseCatalogSystem CourseCatalogSystem > CourseCatalogSystem > Represent subsystems as three items in model: 1. > package; 2. > class, 3. subsystem interface (class with stereotype >). Subsystem package provides a container for the elements in the subsystem. The interaction diagrams describe how the subsystem elements collaborate to implement the operations of the interface the subsystem realizes, Note: > class actually realizes the interface and will orchestrate the implementation of the subsystem operations. Different (additional) interfaces would have their own proxy!

12 Subsystem Design: Major Steps Distribute Subsystem behaviors to Subsystem Elements  that is, the design components inside the subsystem. Next, Document Subsystem Elements (e.g. classes…) Document internal structural relationships among classes Then document the interfaces upon which the subsystem itself is dependent. Then, review the results of your subsystem design. Now, let’s look at each of these

13 CourseCatalogSystem > ICourseCatalogSystem getCourseOfferings() > subsystem responsibility Subsystem Responsibilities Subsystem responsibilities defined by the interface it realizes  When a subsystem realizes an interface, it makes a commitment to support every operation defined by the interface.  Interface operations may be realized by  Internal class operations (which may require collaboration with other classes or subsystems)  An interface realized by a contained subsystem.

14 Distributing Subsystem Responsibilities (1 of 2) For each interface operation (note: this is a loop)  Identify new, or reuse existing, design elements (e.g., classes and/or contained subsystems, if required behavior is complex)  Create new classes/subsystems where existing classes/subsystems cannot provide the required behavior  Try to reuse first – but,  Be careful and avoid having effectively the same classes in two different subsystems.  Incorporate applicable mechanisms (e.g., persistence, distribution, etc.)

15 Distributing Subsystem Responsibility** (2 of 2)  Document design element collaborations in “interface realizations” to show how the behaviors are realized via interaction diagrams. Here’s the real beef! (coming)  One or more interaction diagrams per interface operation  These ‘internal’ interaction diagrams show exactly what classes provide the interface, what needs to happen internally to provide the subsystem’s functionality, and which classes send messages out from the subsystem.  These diagrams are ‘owned’ by the subsystem and can be used to design the internal behavior of the subsystem. Essential for subsystems w/ complex internal designs Enables behavior to be understood; hopefully rendering it reusable across contexts.

16 Modeling Convention: Subsystem Interaction Diagrams - General Subsystem Client Subsystem Proxy Design Element 1 performResponsibility( ) Op1() subsystem responsibility Op2() Design Element 2 Op3() Op4() Internal subsystem interactions Subsystem interface not shown

17 Modeling Convention: Subsystem Interaction Diagrams - General Subsystem Client Subsystem Proxy Design Element 1 performResponsibility( ) Op1() subsystem responsibility Op2() Design Element 2 Op3() Op4() Internal subsystem interactions A message should be drawn from the > client to the > Note: interface does not appear on internal subsystem interaction diagram. Remainder of diagram should model how the > class delegates responsibility for performing the invoked operation to the other subsystem elements.  Recommend you name the interaction diagram :: >. This convention simplifies future tracing of interface behaviors to the classes implementing the interface operations.

18 Example: CourseCatalogSystem Subsystem In Context (1 of 2) subsystem interface : Student : RegisterFor CoursesForm : Registration Controller : Schedule : Student : ICourseCatalog System A list of the available course offerings for this semester are displayed Student wishes to create a new schedule 1: // create schedule( ) 4: // display course offerings( ) 2: // get course offerings( ) 3: getCourseOfferings(Semester) subsystem responsibility This sequence diagram sets the context of what will be performed in Subsystem Design. Puts requirements on the subsystem, and Is the primary input specification to the task of creating local interactions within the subsystem. Note: I have ‘cut’ a lot of detail out of this sequence diagram and the next one so that it is ‘easy’ to see the thrust of this slide…

19 Example: CourseCatalogSystem Subsystem In Context (2 of 2) subsystem interface : Student : RegisterFor CoursesForm : Registration Controller : Schedule : Student : ICourseCatalog System 1: // create schedule( ) 2: // get course offerings( ) 3: getCourseOfferings(Semester) subsystem responsibility Legacy RDBMS Database Access The ICourseCatalogSystem::getCourseOfferings() documentation specifies: “Retrieve the course offerings available for the specified semester.” So retrieval of the course offerings from legacy database is responsibility of CourseCatalog system. Now, must show exactly HOW this is done using the RDBMS persistency mechanism. This will be shown when we actually do the subsystem design (ahead)

20 (Done:) Provide access to the class libraries needed to implement JDBC; (i.e., Provide java.sql package) (Done. Seen in Persistency:) Create the necessary DBClasses and their dependencies (for objects requiring persistency)  Remember, the proxy class is the class that manages the responsibilities of the subsystem as found in its interface.  You may think of it as a ‘control class’ for a particular interface. Review slide 14 (and others) in lecture 29. DBClass and PersistentClassList and PersistentClass (and others) were stereotyped >, which implied their specific implementation is built by the designer when applying a mechanism such as persistency, legacy database access, etc.  Recall DBClass had methods like read(), update(), delete() create()… In the next couple of slides, we are doing exactly that with the DBCourseOffering class in attempting the access the legacy RDBMS to read data, execute a query, and more. We have a DBCourseOffering along with CourseOfferingList and a CourseOffering to get results from executeQuery() (ahead) Review: Incorporating JDBC: Steps of Steps (continued)

21 more Note also that the Course Catalog System is clearly an Actor, which, of course, it should be, AND it is shown as such – in place – in the Sequence Diagram. Note that the proxy class, DBCourseOffering, and the objects within java.sql are all involved in constituting the interface with the legacy RDBMS system. So, we are seeing HOW the Course Catalog Subsystem via the proxy class and its dependencies are handling responsibilities. Note that the next couple of slides do NOT have the caveat ‘Context.’  They do not show the context for the subsystem or its interface; rather, this is the design implementation of the interface!  This is the subsystem design.

22 Ex: Local CourseCatalogSystem Subsystem Interaction Subsystem Proxy (represents Subsystem) RDBMS Read Internals of subsystems should yield interaction diagrams that look like this. We see collaborations to implement the getCourseOfferings operation of the ICourseCatalogSystem interface. Recall: legacy system stores course offerings in an RDBMS. Here we show how the RDBMS persistency mechanism identified in Architectural Design is realized in the design. CourseCatalogSystem (proxy) is in subsystem. DBCourseOffering object is created by designer (think DBClass in past lectures) as needed persistency and legacy interfacing. There is a dependency between the DBCourseOfferings and objects in java.sql starting with Connection and the actual access to the RDBMS via actor CourseCatalog. Note the design objects: CourseOfferingList and CourseOffering (no longer >

23 Ex: Local CourseCatalogSystem Subsystem Interaction Subsystem Proxy RDBMS Read To read the course offerings, the persistency client requests a service from the subsystem interface, represented by the proxy class, who asks the DBCourseOffering class to retrieve a course offerings for the specified semester. DBCourseOffering creates a new statement using Connection class’s createStatement() operation. The statement is executed; data is returned to ResultSet object. DBCourseOffering then creates a list of CourseOffering instances, CourseOfferingList, populates it with retrieved data, and returns it to the client.

24 If we have time, we’ll go through the Billing System. But the ideas are the same… Idea behind the Billing System is almost the same, but the Billing System does not require a persistency mechanism. Start with the Billing subsystem interface object in the next slide at the end… Really showing how the submitBill(Student, double) is implemented in the subsystem. But first: Billing System in Context – then Local

25 Example: Billing System Subsystem In Context Send student and tuition to the Billing System, which will do the actual billing to the student for the schedule. : Registrar : CloseRegistrationForm : CourseOffering : Schedule : Student. : IBillingSystem : ICourseCatalogSystem : CloseRegistrationController Close registration for each course offering Retrieve a list of course offerings for the current semester If the maximum number of selected primary courses have not been committed, select alternate course offerings). Currently assuming tuition based on number of offerings taken and certain attributes of students. If different offerings get different prices this will change slightly. Repeat twice this is for simplicity; realistically, an indefinite number of iterations could occur) Finally commit or cancel the course offering once all leveling has occurred 1. // close registration( ) 2. // close registration( ) 2.2. // close registration( ) 1.1. // is registration open?( ) 2.6. submitBill(Student, double) 2.3. // level( ) 2.1. getCourseOfferings(Semester) 2.4. // close( ) 2.5. getTuition( ) subsystem interface subsystem responsibility Here, will demonstrate design of a subsystem that does not require a persistency mechanism. This is at portion of the Close Registration use-case realization sequence diagram. The internals of the Billing System Subsystem have not been designed yet. That is the purpose of this activity, Subsystem Design Now, we are really after the next slide…

26 Example: Billing System Subsystem In Context Send student and tuition to the Billing System, which will do the actual billing to the student for the schedule. : Registrar : CloseRegistrationForm : CourseOffering : Schedule : Student. : IBillingSystem : ICourseCatalogSystem : CloseRegistrationController Close registration for each course offering Retrieve a list of course offerings for the current semester If the maximum number of selected primary courses have not been committed, select alternate course offerings). Currently assuming tuition based on number of offerings taken and certain attributes of students. If different offerings get different prices this will change slightly. Repeat twice this is for simplicity; realistically, an indefinite number of iterations could occur) Finally commit or cancel the course offering once all leveling has occurred 1. // close registration( ) 2. // close registration( ) 2.2. // close registration( ) 1.1. // is registration open?( ) 2.6. submitBill(Student, double) 2.3. // level( ) 2.1. getCourseOfferings(Semester) 2.4. // close( ) 2.5. getTuition( ) subsystem interface subsystem responsibility Here we put requirements on the subsystem, and the sequence diagram is the primary input spec to creating local interactions for the subsystem. We see the operations subsystem must support. Shows the simple way some client (CloseRegistrationController here) deals with the task of submitting bill to the legacy Billing System. More coming…

27 The IBillingsystem::submitBill() documentation specifies the following: “Billing information must be converted into a format understood by the external Billing System and then submitted to the external Billing System. Thus the actual generation and submission of the bill is responsibility of the Billing System subsystem once the bill and proper parameters are passed to it. But the billing information must be converted into a format that the Billing System can understand. Let’s see how all this is done… Explanation for next slides

28 Example: Local BillingSystem Subsystem Interaction Billing System Client : BillingSystem : StudentBillingTransaction : BillingSystemInterface : Billing System : Student. 1. submitBill(Student, double) 1.1. create(Student, double) 1.2. submit(StudentBillingTransaction) // get contact info( ) Retrieve the information that must be included on the bill // open connection( ) // process transaction( ) // close connection( ) Subsystem Proxy Logic here must convert the contract info into a format (StudentBillingTransaction) that the Billingsystem can understand. Given this, the proxy will orchestrate opening, processing, and closing the connection (and submitting the bill). No DBCourseOffering is needed here But StudentBillingTransaction is designed to convert data into a form the Billing System can understand from Student information and the ‘double.’ We simply see HOW the subsystem interface is realized.

29 Example: Local BillingSystem Subsystem Interaction Billing System Client : BillingSystem : StudentBillingTransaction : BillingSystemInterface : Billing System : Student. 1. submitBill(Student, double) 1.1. create(Student, double) 1.2. submit(StudentBillingTransaction) // get contact info( ) Retrieve the information that must be included on the bill // open connection( ) // process transaction( ) // close connection( ) Subsystem Proxy The client object initiating the interaction is abstracted. Again, we don’t care… The BillingSystem subsystem proxy class actually realizes the IBillingSystem interface and drives this realization by delegating the implementation of the interface to the subsystem elements.

30 Example: Local BillingSystem Subsystem Interaction Billing System Client : BillingSystem : StudentBillingTransaction : BillingSystemInterface : Billing System : Student. 1. submitBill(Student, double) 1.1. create(Student, double) 1.2. submit(StudentBillingTransaction) // get contact info( ) Retrieve the information that must be included on the bill // open connection( ) // process transaction( ) // close connection( ) Subsystem Proxy The BillingSystem proxy class instance creates a StudentBillingTransaction specific to the external Billing System. This transaction will be in a format that the Billing System can process. The StudentBillingTransaction knows how to create itself using information from the given Student. After creating the StudentBillingTransaction, the BillingSystem proxy class instance submits the transaction to the class instance that actually communicates with the Billing System. Note that only a single message is sent to the proxy: submitBill(…) The proxy, then, implements this responsibility by calling create(Student,double) and submit(StudentBillingTransaction).