Chapter 10. The Bridge Pattern
At first sight, the Bridge pattern looks much like the Adapter pattern in that a class is used to convert one kind of interface to another. However, the Adapter pattern is intended to make one or more classes' interfaces look the same as that of a particular class. By contrast, the Bridge pattern is designed to separate a class's interface from its implementation so that you can vary or replace the implementation without changing the client code.
The participants in the Bridge pattern are
the Abstraction, which defines the class's interface,
the Refined Abstraction, which extends and implements that interface,
the Implementor, which defines the interface for the implementation classes, and
the ConcreteImplementors, which ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access