If you understand Strategy, you understand Bridge.
Strategy is a concretion composed with an abstraction.Bridge is a concretion composed with an abstraction… that’s composed with another abstraction.
In other words:Bridge is what happens when you nest Strategy.
Strategy helps you vary what you do. Bridge helps you vary what you do and the context in which you do it.
Instead of just varying an algorithm we can also *vary the context in which it runs*.
Just like you can pair any camera with any lens — as long as they follow the same interface — bridge lets you combine elements from two type hierarchies.
📕 My book, The Object Oriented Way, doesn’t ask you to memorize patterns. It helps you understand what they really mean.
Christopher Okhravi
If you understand Strategy, you understand Bridge.
Strategy is a concretion composed with an abstraction.Bridge is a concretion composed with an abstraction… that’s composed with another abstraction.
In other words:Bridge is what happens when you nest Strategy.
Strategy helps you vary what you do.
Bridge helps you vary what you do and the context in which you do it.
Instead of just varying an algorithm we can also *vary the context in which it runs*.
Just like you can pair any camera with any lens — as long as they follow the same interface — bridge lets you combine elements from two type hierarchies.
📕 My book, The Object Oriented Way, doesn’t ask you to memorize patterns.
It helps you understand what they really mean.
Link in the comments.
4 months ago | [YT] | 51