Bridge

E173609

Bridge is a structural design pattern that decouples an abstraction from its implementation so that the two can vary independently.

All labels observed (1)

Label Occurrences
Bridge canonical 1

How this entity was disambiguated

Statements (47)

Predicate Object
instanceOf Design pattern
Structural design pattern
abstractionHas Implementor reference
alsoKnownAs Handle-Body pattern
Pimpl idiom (in some C++ usages)
appliesWhen Abstractions and implementations should not be bound at compile time
Both abstractions and implementations should be extensible by subclassing
Changes in implementation should not affect client code
You want to share an implementation among multiple objects
belongsTo Gang of Four design patterns
category Structural pattern
consequence Better separation of concerns
Improved extensibility
Increased complexity from additional indirection
definesRole Abstraction
ConcreteImplementor
Implementor
RefinedAbstraction
describedIn Design Patterns: Elements of Reusable Object-Oriented Software
differsFrom Adapter pattern by being designed up-front rather than applied to existing interfaces
enables Combining different abstractions with different implementations without subclass explosion
exampleDomain Graphics rendering APIs
Persistence layers
Windowing systems
motivation Allow configuration or switching of implementations at runtime
Avoid permanent binding between abstraction and implementation
primaryIntent Decouple an abstraction from its implementation so that the two can vary independently
relatedTo Abstract Factory
surface form: Abstract Factory pattern

Adapter
surface form: Adapter pattern

Strategy pattern
separates Abstraction
Implementation
solves Class explosion from multiple dimensions of variation
Tight coupling between abstraction and implementation
structureFeature Abstraction delegates work to Implementor interface
ConcreteImplementor provides platform-specific behavior
supports Independent variation of abstraction hierarchy
Independent variation of implementation hierarchy
typicalLanguageUse C#
C++
Java
umlElement Abstraction class
ConcreteImplementor classes
Implementor interface
usedFor Separating UI abstractions from OS-specific implementations
Supporting multiple platforms
Supporting multiple rendering backends

How these facts were elicited

Referenced by (1)

Full triples — surface form annotated when it differs from this entity's canonical label.