23.07.2012 Views

Design Patterns Explained

Design Patterns Explained

Design Patterns Explained

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

292 Part V • Handling Variations with <strong>Design</strong> <strong>Patterns</strong><br />

E-tail: A case study<br />

in variation<br />

For example, patients coming to a hospital typically go to the<br />

admitting office first. But when there is a life-threatening situation,<br />

the patient goes directly to the emergency room before having to go<br />

to admitting. These are the variations in the real world, the different<br />

special cases that our system has to deal with.<br />

And this is what creates headaches for us analysts. Can patterns<br />

help us deal with variation more efficiently?<br />

I have used an approach to make explicit the variations in the sys tem<br />

and then use the analysis to identify the patterns I ought to use in my<br />

design. The steps in my approach are as follows:<br />

1. Identify the most important features in one case and organize<br />

them in a matrix. Label each feature with the concept that the<br />

feature represents.<br />

2. Proceed through the other cases, expanding the matrix as nec<br />

essary. Handle each case independently of the others.<br />

3. Expand the Analysis Matrix with new concepts.<br />

4. Use the rows to identify rules.<br />

5. Use the columns to identify specific cases.<br />

6. Identify design patterns from this analysis.<br />

7. Develop a high-level design.<br />

Case Study in Variation: An International<br />

E-Tail System<br />

Suppose an e-tail system must process sales orders in several different<br />

nations. Initially I have to handle just the United States and<br />

Canada. I look at my requirements and see several things that vary. I<br />

note these in Table 20-1.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!