Bridge
Split abstraction from implementation so both can grow independently. Its diagram matches Strategy’s; the difference is that Strategy swaps an algorithm while Bridge separates two axes of variation. Against Adapter the difference is timing – Bridge is prevention at design time, Adapter is repair after the fact.
Structure
classDiagram
class Abstraction {
#impl: Implementor
+operation()
}
class RefinedAbstraction {
+operation()
+extraOperation()
}
class Implementor {
<<interface>>
+operationImpl()
}
class ConcreteImplA {
+operationImpl()
}
class ConcreteImplB {
+operationImpl()
}
Abstraction <|-- RefinedAbstraction
Abstraction o--> Implementor : the bridge
Implementor <|.. ConcreteImplA
Implementor <|.. ConcreteImplB
Telling It Apart
Patterns whose structure looks the same but whose intent does not. See the Confusing Pairs reference.