O'Reilly logo

Design Patterns Explained: A New Perspective on Object-Oriented Design, Second Edition by Alan Shalloway, James R. Trott

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. The Strategy Pattern

Overview

This chapter introduces a new case study, which comes from the area of e-commerce (electronic commerce over the Internet). It also begins a solution using the Strategy pattern. I return to this case study in Chapter 16, “The Analysis Matrix.”

This chapter

•   Returns to the problem of new requirements and describes approaches to handling new variations of an existing theme.

•   Explains which approach is consistent with the Gang of Four’s philosophy and why.

•   Introduces the new case study.

•   Describes the Strategy pattern and shows how it handles a new requirement in the case study.

•   Describes the key features of the Strategy pattern.

An Approach to Handling New Requirements ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required