Bridge Design Pattern is used to decouples an abstraction used the client code from its implementation that means it separates the abstraction and its implementation in separate class hierarchies. And also Bridge pattern prefers the composition over the inheritance because inheritance isn’t always flexible and it breaks the encapsulation, so any change made in the implementor that affects the abstraction used by client code. In software engineering, one of popular notion is “prefer composition over inheritance“. Bridge design pattern promotes this popular notion. Similar to the other pattern, this pattern also comes under the structural design pattern family of GoF

The post Bridge Design Pattern – Structural Patterns appeared first on Dinesh on Java.

Source link

Bridge Design Pattern – Structural Patterns

Leave a Reply

Your email address will not be published. Required fields are marked *