Chapter 6. Bridge

The BRIDGE pattern focuses on the design of an abstraction. The word abstraction refers to a class that relies on a set of abstract operations, where there are several possible implementations of the set of abstract operations.

The ordinary way to implement an abstraction is to create a class hierarchy with an abstract class at the top that defines the abstract operations; each subclass in the hierarchy provides a different implementation of the set of abstract operations. However, this approach becomes insufficient when you need to subclass the hierarchy for some other reason.

You can create a bridge by moving the set of abstract operations to an interface, so that an abstraction will depend on an implementation of the interface. ...

Get Design Patterns in C# 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.