4A good design Implement all explicit and implicit requirements Be a readable and understandable guide for developers and customersProvide a complete picture of software
5Design Principles (1)From Davis [DAV95]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.
6Design Principles (2)From Davis [DAV95]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.
7Fundamental Concepts Abstraction — data, procedure, control Refinement — elaboration of detail for bstractionsModularity — compartmentalize data and functionArchitecture — overall structure of the softwarePartitioning — partition the program structureData structure — the logical relationship of dataProcedure — the algorithms that achieve functionHiding — controlled interfacesFunction independences — cohesion, coupling
9Data Abstraction door manufacturer model number type swing direction insertslightstypenumberweightopening mechanismimplemented as a data structure
10Procedural Abstraction opendetails of enteralgorithmimplemented with a "knowledge" of theobject that is associated with enter
11Refinement Refinement — elaboration of detail for all abstractions openwalk to door;reach for knob;open door;repeat until door opensturn knob clockwise;walk through;if knob doesn't turn, thenclose door.take key out;find correct key;insert in lock;endifpull/push doormove out of way;end repeat
12Modular Designmodularity—compartmentalization of data & function
25Why Information Hiding? Leads to encapsulation — an attribute of high quality designReduces the likelihood of “side effects”Limits the global impact of local design decisionsEmphasizes communication through controlled interfacesDiscourages the use of global dataResults in higher quality software
26Functional Independence COHESION - the degree to which amodule performs one and only onefunction.COUPLING - the degree to which amodule is "connected" to othermodules in the system.
27CohesionThe degree to which a module performs one and only one function
28CouplingA measure of interconnection among modules
31Design HeuristicsEvaluate 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.”