23.07.2012 Views

Design Patterns Explained

Design Patterns Explained

Design Patterns Explained

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PART II<br />

The Limitations of<br />

Traditional Object-Oriented<br />

<strong>Design</strong><br />

Part Overview<br />

In this part, I solve a real-world problem using standard<br />

object-oriented methods. This was a problem I worked on when I<br />

was just beginning to learn design patterns.<br />

Chapter Discusses These Topics<br />

3 • A description of the CAD/CAM problem: extract informa-<br />

tion from a large computer-aided design/computer-aided<br />

manufacturing (CAD/CAM) database to feed a complex and<br />

expensive analysis program.<br />

• Because the CAD/CAM system continues to evolve, the<br />

problem cries out for flexible code.<br />

4 • My first solution to the CAD/CAM problem, using standard<br />

object-oriented methods.<br />

• At the time I actually worked on this problem, I hadn't yet<br />

learned the essence of the principles behind many design<br />

patterns. This resulted in an initial solution that over-relied<br />

on inheritance. It was easy to design and the initial solu<br />

tion worked, but I ended up with too many special cases.<br />

• My solution had significant problems— difficult mainte<br />

nance and inflexibility— just the things I hoped to avoid<br />

with object-oriented design.<br />

• Later, in Part IV, I will revisit the problem in Chapter 12,<br />

"Solving the CAD/CAM Problem with <strong>Patterns</strong>." I will solve<br />

the problem again using design patterns to orchestrate the<br />

application's architecture and its implementation details.<br />

By doing this, I create a solution that is much easier to<br />

maintain and is much more flexible.<br />

In this section<br />

43

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

Saved successfully!

Ooh no, something went wrong!