Enterprise Application Architecture with .NET Core
by Ganesan Senthilvel, Ovais Mehboob Ahmed Khan, Habib Qureshi
Bridge pattern
The purpose of the bridge pattern is to create a separation between an interface that the client uses from the actual implementation. This will allow the client's interface (abstraction) to vary independently from the actual implementation. The bridge primarily uses aggregation to separate the responsibilities exposed by the interfaces.
Let's say we have a simple interface that provides the capability to perform an addition operation. We create a new interface and expose it to the client that also provides the multiply operation. And we implement the new interface by aggregating the object of the existing interface in a way that we call our actual implementation logic by calling the addition operation a number of times to achieve ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access