Designing Software for Ease of Extension and Contraction Bob Hazen Tim Santucci Chris Dahn A Team One Presentation
CS-575 Software Design, Team 12 Motivation Industry has produced (is still producing) a number of complaints Cannot produce a “proper subset” of functionality Extension requires major re-writes Contraction requires major re-writes Cannot customize systems due to lack of flexibility
CS-575 Software Design, Team 13 Obstacles to Expansion and Contraction Lack of information hiding Knowledge of component relationships Single component, multiple functionality Violation of “uses” hierarchical structure
CS-575 Software Design, Team 14 Program Families Classical training involves “programming by flow-chart” But, we’re designing for a changing environment Runtime environment Implementation differences User demands Designing for expansion and contraction leads to program families
CS-575 Software Design, Team 15 The Methodology Minimal subsets and minimal increments Interface definitions using information hiding Design as virtual machines “Uses” hierarchy
CS-575 Software Design, Team 16 Example – The Automated Kitchen Minimal subsets and increments Level 0 Boil Bake Sauté Refrigerate Slice Dice
CS-575 Software Design, Team 17 The Automated Kitchen continued... Minimal subsets and increments Level 1 Make tea, coffee, soup Toast bread, bagels Bake muffins, pot roast Sauté eggs, pancakes Chill juice, fruit, preserve foods
CS-575 Software Design, Team 18 The Automated Kitchen continued... Minimal subsets and increments Level 2 Prepare breakfast Prepare lunch Prepare dinner
CS-575 Software Design, Team 19 The Automated Kitchen continued... Minimal subsets and increments Level 3 Prepare food
CS-575 Software Design, Team 110 The Automated Kitchen continued... Interface definitions using information hiding Level 0 Slicing is done with ginsu or veg-o-matic Boiling is done with gas, electric, coal or microwave Level 1 Coffee is prepared on stovetop or drip brew Bread is made in oven or bread machine Level 2 Breakfast is instant or drip coffee and sauté eggs or microwave breakfast
CS-575 Software Design, Team 111 The Automated Kitchen continued... Design as virtual machines Coffee maker Bread machine Scramble eggs Boil water
CS-575 Software Design, Team 112 The Automated Kitchen finally! “Uses” hierarchy make breakfast brew coffeescramble eggsmake toastmake pancakes boilsautebakeslicemix Level 0 uses no other program } Level i uses at least 1 program on i-1 and nothing higher than i-1 }
CS-575 Software Design, Team 113 “Uses” criteria A is simpler for using B B is not complicated for not using A B defines a useful program without A A is not a useful program without B
CS-575 Software Design, Team 114 What does all this mean? Requirements plan for changing environment There’s no such thing as a free lunch Levels are defined by the “uses” relationship, not by modules “Low level” operations work on known data structures “Mid level” operations swap known data structures for similar data structures “High level” operations create and destroy these data structures
CS-575 Software Design, Team 115 Questions