Part II: The Limitations of Traditional Object-Oriented Design

Part Overview

In this part, I solve a real-world problem using standard object-oriented methods. This was a problem I worked on when I was just beginning to learn design patterns.

Chapter Discusses These Topics
3
  • A description of the CAD/CAM problem: extract information from a large computer-aided design/computer-aided manufacturing (CAD/CAM) database to feed a complex and expensive analysis program.

  • Because the CAD/CAM system continues to evolve, the problem cries out for flexible code.

4
  • My first solution to the CAD/CAM problem, using standard object-oriented methods.

  • At the time I actually worked on this problem, I hadn't yet learned the essence of the principles behind many design patterns. This resulted in an initial solution that over-relied on inheritance. It was easy to design and the initial solution worked, but I ended up with too many special cases.

  • My solution had significant problems—difficult maintenance and inflexibility—just the things I hoped to avoid with object-oriented design.

  • Later, in Part IV, I will revisit the problem in Chapter 12, “Solving the CAD/CAM Problem with Patterns.” I will solve the problem again using design patterns to orchestrate the application's architecture and its implementation details. By doing this, I create a solution that is much easier to maintain and is much more flexible.

This part is important to read because it illustrates a typical problem that results in traditional object-oriented design—taller-than-necessary inheritance hierarchies that have tight coupling and low cohesion.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset