These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

Chapter 11 Component-Level Design
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Lecture 9 Improving Software Design CSC301-Winter 2011 – University of Toronto – Department of Computer Science Hesam C. Esfahani
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Component-Level Design
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 Chapter 16 Component-Level Design. 2 Component-Level Design  the closest design activity to coding  the approach:  review the design description.
Component-Level Design
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Developed by Reneta Barneva, SUNY Fredonia Component Level Design.
Chapter 11 Component-Level Design
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Design Concepts "You can use an eraser on the drafting table or a sledge hammer on the construction site." Frank Lloyd Wright.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Ch:10 Component Level Design Unit 4. What is Component? A component is a modular building block for computer software Because components reside within.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Chapter :11 Component-Level Design
Design engineering Vilnius The goal of design engineering is to produce a model that exhibits: firmness – a program should not have bugs that inhibit.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 Chapter 11 Component-Level Design. 2 What is a Component? OMG Unified Modeling Language Specification [OMG01] defines a component as “… a modular, deployable,
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Programming Techniques Lecture 10 Component-Level Design Based on: Software Engineering, A Practitioner’s Approach, 6/e, R.S. Pressman Software Engineering.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 10a: Architectural Design Software Engineering: A Practitioner’s Approach, 6/e Chapter 10a:
1 Supplementary Slides for Software Engineering: A Practitioner's Approach, 5/e Supplementary Slides for Software Engineering: A Practitioner's Approach,
CS 8532: Adv. Software Eng. – Spring 2009 Dr. Hisham Haddad Chapter 11 CS 8532: Advanced Software Engineering Dr. Hisham Haddad Class will start momentarily.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 11a: Component-Level Design Software Engineering: A Practitioner’s Approach, 6/e Chapter.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 Chapter 16 Component-Level Design. 2 Component-Level Design  the closest design activity to coding  the approach: review the design description for.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Chapter 14 컴포넌트-수준 설계 Component-Level Design
CHAPTER 3 MODELING COMPONENT-LEVEL DESIGN.
Component Design Elaborating the Design Model. Component Design Translation of the architectural design into a detailed (class-based or module- based)
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 9: Design Engineering Software Engineering: A Practitioner’s Approach, 6/e Chapter.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Component-Level Design and User Interface Design Departemen Ilmu Komputer IPB 2009.
February 19, February 19, 2016February 19, 2016February 19, 2016 Azusa, CA Sheldon X. Liang Ph. D. Software Engineering in CS at APU Azusa Pacific.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 11b: Component-Level Design Software Engineering: A Practitioner’s Approach, 6/e Chapter.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Design Engineering 1. Analysis  Design 2 Characteristics of good design 3 The design must implement all of the explicit requirements contained in the.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill, 2009). Slides copyright 2009 by Roger Pressman.1.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Design Concepts ch-8
Analysis Classes Unit 5.
Chapter 14 Component-Level Design
Component-Level Design
Software Engineering: A Practitioner’s Approach, 6/e Chapter 9 Design Engineering copyright © 1996, 2001, 2005 R.S. Pressman & Associates, Inc. For.
Software Engineering: A Practitioner’s Approach, 6/e Chapter 11 Component-Level Design copyright © 1996, 2001, 2005 R.S. Pressman & Associates, Inc.
Chapter 10 Component-Level Design
Component-Level Design
Component-Level Design
Component-Level Design
Chapter 16 Component-Level Design
Component-Level Design
Object-Oriented Design
COSC 4406 Software Engineering
Chapter 10 – Component-Level Design
Presentation transcript:

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Component-Level Design based on Chapter 11 - Software Engineering: A Practitioner’s Approach, 6/e Component-Level Design based on Chapter 11 - Software Engineering: A Practitioner’s Approach, 6/e copyright © 1996, 2001, 2005 R.S. Pressman & Associates, Inc. For University Use Only May be reproduced ONLY for student use at the university level when used in conjunction with Software Engineering: A Practitioner's Approach. Any other reproduction or use is expressly prohibited.

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, What is a Component? OMG Unified Modeling Language Specification [OMG01] defines a component as OMG Unified Modeling Language Specification [OMG01] defines a component as “… a modular, deployable, and replaceable part of a system that encapsulates implementation and exposes a set of interfaces.” “… a modular, deployable, and replaceable part of a system that encapsulates implementation and exposes a set of interfaces.” OO view: a component contains a set of collaborating classes OO view: a component contains a set of collaborating classes Conventional view: logic, the internal data structures that are required to implement the processing logic, and an interface that enables the component to be invoked and data to be passed to it. Conventional view: logic, the internal data structures that are required to implement the processing logic, and an interface that enables the component to be invoked and data to be passed to it. What would be an example?

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, OO Component OO view: a component contains a set of collaborating classes  What are the differences?  Interface=method?

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Conventional Component Conventional view: Conventional view: logic, the internal data structures that are required to implement the processing logic, and logic, the internal data structures that are required to implement the processing logic, and an interface that enables the component to be invoked and data to be passed to it. an interface that enables the component to be invoked and data to be passed to it.

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Cohesion Conventional view: Conventional view: the “single-mindedness” of a module the “single-mindedness” of a module OO view: OO view: a component or class encapsulates only attributes and operations that are closely related to one another Levels of cohesion a component or class encapsulates only attributes and operations that are closely related to one another Levels of cohesion Functional, Layer, Communicational, Sequential, Procedural, Temporal, utility Functional, Layer, Communicational, Sequential, Procedural, Temporal, utility Conventional view: Conventional view: The degree to which a component is connected to other components and to the external world The degree to which a component is connected to other components and to the external world OO view: OO view: a qualitative measure of the degree to which classes are connected to one another a qualitative measure of the degree to which classes are connected to one another Level of coupling Level of coupling Content, Common, Control, Stamp, Data, Routine call, Type use, Inclusion or import, External Content, Common, Control, Stamp, Data, Routine call, Type use, Inclusion or import, External Coupling conventional OO view: a component contains a set of collaborating classes

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Component Level Design Step 1. Identify all design classes that correspond to the problem domain, infrastructure domain. Step 1. Identify all design classes that correspond to the problem domain, infrastructure domain. Step 2. Elaborate all design classes (not acquired as reusable components). Step 2. Elaborate all design classes (not acquired as reusable components). Step 2a. Specify message details when classes or component collaborate. Step 2a. Specify message details when classes or component collaborate. Step 2b. Identify appropriate interfaces for each component. Step 2b. Identify appropriate interfaces for each component. Step 2c. Elaborate attributes and define data types and data structures. Step 2c. Elaborate attributes and define data types and data structures. Step 2d. Describe processing flow within each operation in detail. Step 2d. Describe processing flow within each operation in detail. Step 3. Describe persistent data sources (databases and files) and identify the classes required to manage them. Step 3. Describe persistent data sources (databases and files) and identify the classes required to manage them. Step 4. Develop and elaborate behavioral representations for a class or component. Step 4. Develop and elaborate behavioral representations for a class or component. Step 5. Elaborate deployment diagrams to provide additional implementation detail. Step 5. Elaborate deployment diagrams to provide additional implementation detail. Step 6. Factor every component-level design representation and always consider alternatives. Step 6. Factor every component-level design representation and always consider alternatives.  What operation?  Is your design the best?

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Activity Diagram  What is this about wrt. Component-level design?  What would be behavioral wrt. Component-level design?

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Statechart  What is this about wrt. Component-level design?  How does this differ from AD wrt. Component-level design?

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Collaboration Diagram  What is this about wrt. Component-level design?

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Refactoring

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Algorithm Design the closest design activity to coding the closest design activity to coding the approach: the approach: review the design description for the component review the design description for the component use stepwise refinement to develop algorithm use stepwise refinement to develop algorithm use structured programming to implement procedural logic use structured programming to implement procedural logic use ‘formal methods’ to prove logic use ‘formal methods’ to prove logic

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Stepwise Refinement open walk to door; reach for knob; open door; walk through; close door. repeat until door opens turn knob clockwise; if knob doesn't turn, then take key out; take key out; find correct key; find correct key; insert in lock; insert in lock; endif pull/push door move out of way; end repeat Recall:

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Algorithm Design Model represents the algorithm at a level of detail that can be reviewed for quality represents the algorithm at a level of detail that can be reviewed for quality options: options: graphical (e.g. flowchart, box diagram) graphical (e.g. flowchart, box diagram) pseudocode (e.g., PDL)... choice of many pseudocode (e.g., PDL)... choice of many programming language( ? ) programming language( ? ) decision table decision table conduct walkthrough to assess quality conduct walkthrough to assess quality  Is UML inadequate?  At which level? Component or Class?

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Structured Programming for Procedural Design uses a limited set of logical constructs: sequence conditional — if-then-else, select-case — if-then-else, select-case loops — do-while, repeat until — do-while, repeat until leads to more readable, testable code can be used in conjunction with ‘proof of correctness’  “go-to” considered ???  What’s more to Structured Programming than the above?

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, A Structured Procedural Design Can you add something to make this “unstructured??

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Decision Tables: Another Ambiguity Test  Natural Language  “The system shall report to the operator all faults that originate in critical functions or that occur during execution of a critical sequence and for which there is no fault recovery response.” (adapted from the specifications for the international space station)  A decision table originate in critical functions FTFTFTFT Occur during critical sequence FFTTFFTT No fault recovery response FFFFTTTT Report to operator??? [Chung, RE Lecture Notes]

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Decision Table

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Program Design Language (PDL)

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Omitted Slides

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Basic Design Principles The Open-Closed Principle (OCP). “A module [component] should be open for extension but closed for modification. The Open-Closed Principle (OCP). “A module [component] should be open for extension but closed for modification. The Liskov Substitution Principle (LSP). “Subclasses should be substitutable for their base classes. The Liskov Substitution Principle (LSP). “Subclasses should be substitutable for their base classes. Dependency Inversion Principle (DIP). “Depend on abstractions. Do not depend on concretions.” Dependency Inversion Principle (DIP). “Depend on abstractions. Do not depend on concretions.” The Interface Segregation Principle (ISP). “Many client-specific interfaces are better than one general purpose interface. The Interface Segregation Principle (ISP). “Many client-specific interfaces are better than one general purpose interface. The Release Reuse Equivalency Principle (REP). “The granule of reuse is the granule of release.” The Release Reuse Equivalency Principle (REP). “The granule of reuse is the granule of release.” The Common Closure Principle (CCP). “Classes that change together belong together.” The Common Closure Principle (CCP). “Classes that change together belong together.” The Common Reuse Principle (CRP). “Classes that aren’t reused together should not be grouped together.” The Common Reuse Principle (CRP). “Classes that aren’t reused together should not be grouped together.” Source: Martin, R., “Design Principles and Design Patterns,” downloaded from

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Design Guidelines Components Components Naming conventions should be established for components that are specified as part of the architectural model and then refined and elaborated as part of the component-level model Naming conventions should be established for components that are specified as part of the architectural model and then refined and elaborated as part of the component-level model Interfaces Interfaces Interfaces provide important information about communication and collaboration Interfaces provide important information about communication and collaboration Dependencies and Inheritance Dependencies and Inheritance it is a good idea to model dependencies from left to right and inheritance from bottom (derived classes) to top (base classes). it is a good idea to model dependencies from left to right and inheritance from bottom (derived classes) to top (base classes).

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Collaboration Diagram

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Refactoring

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Object Constraint Language (OCL) complements UML by allowing a software engineer to use a formal grammar and syntax to construct unambiguous statements about various design model elements complements UML by allowing a software engineer to use a formal grammar and syntax to construct unambiguous statements about various design model elements simplest OCL language statements are constructed in four parts: simplest OCL language statements are constructed in four parts: (1) a context that defines the limited situation in which the statement is valid; (1) a context that defines the limited situation in which the statement is valid; (2) a property that represents some characteristics of the context (e.g., if the context is a class, a property might be an attribute) (2) a property that represents some characteristics of the context (e.g., if the context is a class, a property might be an attribute) (3) an operation (e.g., arithmetic, set-oriented) that manipulates or qualifies a property, and (3) an operation (e.g., arithmetic, set-oriented) that manipulates or qualifies a property, and (4) keywords (e.g., if, then, else, and, or, not, implies) that are used to specify conditional expressions. (4) keywords (e.g., if, then, else, and, or, not, implies) that are used to specify conditional expressions.

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, OCL Example context PrintJob::validate(upperCostBound : Integer, custDeliveryReq : Integer) Integer) pre: upperCostBound > 0 pre: upperCostBound > 0 and custDeliveryReq > 0 and custDeliveryReq > 0 and self.jobAuthorization = 'no‘ and self.jobAuthorization = 'no‘ post: if self.totalJobCost <= upperCostBound post: if self.totalJobCost <= upperCostBound and self.deliveryDate <= custDeliveryReq and self.deliveryDate <= custDeliveryReq then then self.jobAuthorization = 'yes' self.jobAuthorization = 'yes' endif endif

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, Why Design Language?