concept

Bridges

Bridges are a software design pattern and architectural concept that decouples an abstraction from its implementation, allowing them to vary independently. This pattern involves creating two separate hierarchies—one for abstractions and one for implementations—connected through a bridge interface, which promotes flexibility and extensibility in systems. It is commonly used in object-oriented programming to avoid a proliferation of classes when multiple dimensions of variation exist.

Also known as: Bridge Pattern, Bridge Design Pattern, Bridge Architectural Pattern, Decoupling Abstraction and Implementation, Bridge Interface Pattern
🧊Why learn Bridges?

Developers should learn and use the Bridge pattern when designing systems where abstractions and implementations need to evolve independently, such as in GUI frameworks where different window types (e.g., dialog, panel) must work with multiple rendering APIs (e.g., OpenGL, DirectX). It reduces complexity by avoiding a combinatorial explosion of subclasses, making code more maintainable and scalable, especially in large applications with cross-cutting concerns.

Compare Bridges

Learning Resources

Related Tools

Alternatives to Bridges