Chapter 7. The Adapter Pattern


I will continue our study of design patterns with the Adapter pattern. The Adapter pattern is a very common pattern, and, as you will see, it is used with many other patterns.

This chapter

•   Explains what the Adapter pattern is, where it is used, and how it is implemented.

•   Presents the key features of the pattern.

•   Uses the pattern to illustrate polymorphism.

•   Illustrates how the UML can be used at different levels of detail.

•   Presents some observations on the Adapter pattern from my own practice, including a comparison of the Adapter pattern and the Facade pattern.

•   Relates the Adapter pattern to the CAD/CAM problem.

Introducing the Adapter Pattern

Get Design Patterns Explained: A New Perspective on Object-Oriented Design, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.