90 likes | 103 Views
Design for Ease in Contraction and Extension. CSE870 Discussion April 16, 2003. Key Ideas. Design for change Maintainability Identified characteristics of “non-adaptable” programs Undesirable properties Distributing related information over numerous programs
E N D
Design for Ease in Contraction and Extension CSE870 Discussion April 16, 2003
Key Ideas • Design for change • Maintainability • Identified characteristics of “non-adaptable” programs • Undesirable properties • Distributing related information over numerous programs • Chaining of data transformations • Designing multi-function components • Circular-uses • Subset: • Smallest useful collection of functions • High cohesion among the functions
Key Ideas (cont’d) • Uses hierarchy: • Degree in which one program uses other programs • Levels: • 0: programs that do NOT use any other programs • Single-purpose programs • I: programs that use at least one program at (I-1) level, not above I-1. • Multi-purpose • Virtual Machines: • SW abstraction/instructions for instructions provided by the HW. • May have several layers of abstractions that can be customized for specific applications
Key Ideas (cont’d) • General vs Specific • General: • SW could work without modification • Not as much concern for designing for flexibility • Run-time costs: customization can be expensive • Specific: • Solution to specific problem • SW footprint can be reduced because it does not contain extraneous functionality • Program can be more efficient • Narrow focus of program
Key Ideas (cont’d) • Flexible design: • Takes specific approach • Provide general services with WELL-DEFINED interfaces • Have specific implementations for these services that are kept ``secret’’ • Information Hiding: • Implementation details of modules (or functions within modules)
Comparison to Program Families • Extension/Contraction paper gives specific techniques for how to build program families
Impact on Modern Technology • Frameworks: • Possible relationship to Graybox (have ability to extend) while adhering closely to superclass interfaces
Impact on Modern Tech (cont’d) • Design Patterns: • Iterator (operations can be indep of data type) • Model View Controller • Bridge: decouples the abstract services from its implementation • Strategy pattern: • Add strategies • Decouple interface for a strategy’s purpose from the specific algorithm. • Factory Pattern: • Composes the abstract components that can then be realized by concrete components • Chain of responsibility: • Each unit should have minimal functionality that can then be extended to provide additional capabilities.
Impact on Modern Day Tech (cont’d) • Distinguishes specification from implementation • Specification: • Implementation: • Later clarified by Lamport, Lynch, Abadi • Potential impact on Aspect-Oriented Programming • Advocate collection of like-purpose functionalities into single module • Interdependence with compiler (def-use) and Russell and Whitehead’s mathematical formulation for set theory (early 19XX’s)