Field Notes: Using the Bridge Pattern

Note that the solution presented in Figures 9-12 and 9-13 integrates the Adapter pattern with the Bridge pattern. I do this because I was given the drawing programs that I must use. These drawing programs have preexisting interfaces with which I must work. I must use the Adapter to adapt them so that they can be handled in the same way.

While it is very common to see the Adapter pattern incorporated into the Bridge pattern, the Adapter pattern is not part of the Bridge pattern.

The Bridge Pattern: Key Features

Intent Decouple a set of implementations from the set of objects using them.
Problem The derivations of an abstract class must use multiple implementations without causing an explosion in the number ...

Get Design Patterns Explained: A New Perspective on Object-Oriented Design now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.