Presentation is loading. Please wait.

Presentation is loading. Please wait.

Comparing Designs By Chris McCall. Comparing Designs A decision-making method for deciding between many designs for a single specification Provides a.

Similar presentations


Presentation on theme: "Comparing Designs By Chris McCall. Comparing Designs A decision-making method for deciding between many designs for a single specification Provides a."— Presentation transcript:

1 Comparing Designs By Chris McCall

2 Comparing Designs A decision-making method for deciding between many designs for a single specification Provides a tangible basis for choosing one design over another Method  Review all available designs  Decide on important characteristics  Assign priorities to each characteristic (1-5)  Assign scores to each design for each characteristic  Find winning design by multiplying priority by score for each characteristic and adding them up

3 Example: Key Word in Context (KWIC) – Specification: An index system that accepts an ordered set of lines  A line is an ordered set of words A word is an ordered set of characters Any line can be “circularly shifted” by removing a word from the front of the line and appending it to the back Outputs an alphabetical list of all circular shifts of all lines

4 KWIC Design 1: Shared Data Master program calls parts in sequence Data is central, computation is modularized Difficult to change because changing data affects all components and isn’t very reusable

5 KWIC Design 2: Abstract Data Data not centrally stored Processing still decomposed and controlled by a Master control Less dependencies and easier to change than previous example

6 KWIC Design 3: Implicit Invocation Data accessed abstractly Computation isn’t explicit, event-driven Easy to reuse because computation relies on events

7 KWIC Design 4: Pipe-and-filter Easy to control order in which computation is done, as opposed to previous example Highly reusable design (filters run independently) Limited design, hard to make interactive

8 Next Step: Choose Important Characteristics + Assign Priorities For our example, important characteristics + priorities  Easy to reuse-- high 5  Easy to change data representation-- high4  Easy to change function-- med3  Good performance-- med3  Easy to change algorithm-- low1 Other possible characteristics:  Modularity  Testability  Maintainability  Easy to use  …etc

9 Last step: Assign scores for each design and calculate winner 37 57 4055 To calculate a score, multiply priority by score for each characteristic of a design Example: Abstract Data Type (1*2) + (4*5) + (3*1) + (3*4) + (5*4) = 57 Highest score indicates the design that best fits your needs

10 Criticism Priorities, design ratings, and the choice of attributes are all subjective Best design might not be the most realistic to implement Everyone has different needs and perspectives (customer vs. developer) Not all designs are as simple or easy to compare as the example shown

11 The End Sources:  Software Engineering Theory and Practice (3 rd Ed)  http://en.wikipedia.org/wiki/Software_design_ pattern


Download ppt "Comparing Designs By Chris McCall. Comparing Designs A decision-making method for deciding between many designs for a single specification Provides a."

Similar presentations


Ads by Google