0 votes
in Design Patterns by
What is a Bridge Design Pattern?

1 Answer

0 votes
by

The bridge pattern is a type of structural design pattern that lets to split large class or closely related classes into 2 hierarchies - abstraction and implementation. These hierarchies are independent of each other and are used whenever we need to decouple an abstraction from implementation. This is called a Bridge pattern because it acts as a bridge between the abstract class and the implementation class. In this pattern, the abstract classes and the implementation classes can be altered or modified independently without affecting the other one.

  1. The above image is the UML representation of the Bridge Pattern. There are 4 main elements of Bridge Pattern. They are:
  2. Abstraction – This is the core of the pattern and it defines its crux. This contains a reference to the implementer.
  3. Refined Abstraction – This extends the abstraction and takes refined details of the requirements and hides it from the implementors.
  4. Implementer – This is the interface for the implementation classes.
  5. Concrete Implementation – These are the concrete implementation classes that implement the Implementer interface.

Related questions

0 votes
asked Oct 17, 2019 in Design Patterns by Robin
0 votes
asked Oct 17, 2019 in Design Patterns by Robin
...