Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Chapter 13 Design Concepts and Principles. 2 Analysis to Design component- level design.

Similar presentations


Presentation on theme: "1 Chapter 13 Design Concepts and Principles. 2 Analysis to Design component- level design."— Presentation transcript:

1 1 Chapter 13 Design Concepts and Principles

2 2 Analysis to Design component- level design

3 3 Where Do We Begin? Spec Prototype Design modeling

4 4  Implement all explicit and implicit requirements  Be a readable and understandable guide for developers and customers  Provide a complete picture of software A good design

5 5 Design Principles (1)  The design process should not suffer from ‘tunnel vision.’  The design should be traceable to the analysis model.  The design should not reinvent the wheel.  The design should “minimize the intellectual distance” between the software and the problem as it exists in the real world.  The design should exhibit uniformity and integration. From Davis [DAV95]

6 6 Design Principles (2)  The design should be structured to accommodate change.  The design should be structured to degrade gently, even when aberrant data, events, or operating conditions are encountered.  Design is not coding, coding is not design.  The design should be assessed for quality as it is being created, not after the fact.  The design should be reviewed to minimize conceptual (semantic) errors. From Davis [DAV95]

7 7 Fundamental Concepts  Abstraction — data, procedure, control  Refinement — elaboration of detail for bstractions  Modularity — compartmentalize data and function  Architecture — overall structure of the software  Partitioning — partition the program structure  Data structure — the logical relationship of data  Procedure — the algorithms that achieve function  Hiding — controlled interfaces  Function independences — cohesion, coupling

8 8 Abstraction  Data abstraction  Procedure abstraction  Control abstraction

9 9 Data Abstraction door implemented as a data structure manufacturer model number type swing direction inserts lights type number weight opening mechanism

10 10 Procedural Abstraction open implemented with a "knowledge" of the object that is associated with enter details of enter algorithm

11 11 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; find correct key; insert in lock; endif pull/push door move out of way; end repeat  Refinement — elaboration of detail for all abstractions

12 12 Modular Design  modularity—compartmentalization of data & function

13 13 Sizing Modules: Two Views

14 14 Modularity: Trade-offs What is the "right" number of modules for a specific software design? optimal number of modules of modules cost of cost of software software number of modules moduleintegrationcost module development cost

15 15

16 16 An Effective Modular System  Modular decomposability  Modular composability  Modular understandability  Modular continuity  Modular protection

17 17 Architecture “The overall structure of the software and the ways in which that structure provides conceptual integrity for a system.” [SHA95a] superordinate subordinate

18 18 Partitioning the Architecture  “horizontal” and “vertical” partitioning are required

19 19 Horizontal Partitioning  define separate branches of the module hierarchy for each major function  use control modules to coordinate communication between functions function 1 function 3 function 2

20 20  software that is easier to test  software that is easier to maintain  propagation of fewer side effects  software that is easier to extend

21 21 Vertical Partitioning: Factoring  design so that decision making and work are stratified  decision making modules should reside at the top of the architecture workers decision-makers

22 22 Data Structure  Item: integer, string…  Vector: array  Space: structure  Linked list, node  Data Structure — a representation of the logical relationship logical relationship

23 23 Software Procedure  Procedure — a precise specification of processing processing

24 24 Information Hiding modulecontrolled interface "secret" clients a specific design decision  Hiding — controlled interfaces

25 25 Why Information Hiding?  Leads to encapsulation — an attribute of high quality design  Reduces the likelihood of “side effects”  Limits the global impact of local design decisions  Emphasizes communication through controlled interfaces  Discourages the use of global data  Results in higher quality software

26 26 Functional Independence COHESION - the degree to which a module performs one and only one function. COUPLING - the degree to which a module is "connected" to other modules in the system.

27 27Cohesion The degree to which a module performs one and only one function

28 28Coupling A measure of interconnection among modules

29 29 stamp data control uncouple common content

30 30 Content Coupling Common Coupling

31 31 Design Heuristics  Evaluate the “first iteration” of the program structure to reduce coupling and improve cohesion.  Attempt to minimize structures with high fan-out; strive for fan-in as depth increases.  Keep the scope of effect of a module within the scope of control of that module.  Evaluate module interfaces to reduce complexity and redundancy and improve consistency.  Define modules whose function is predictable, but avoid modules that are overly restrictive.  Strive for “controlled entry” modules by avoiding “pathological connections.”

32 32

33 33

34 34 Design Specification


Download ppt "1 Chapter 13 Design Concepts and Principles. 2 Analysis to Design component- level design."

Similar presentations


Ads by Google