From the course: C# Design Patterns: Part 3 (2017)

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Bridge pattern explained

Bridge pattern explained - C# Tutorial

From the course: C# Design Patterns: Part 3 (2017)

Start my 1-month free trial

Bridge pattern explained

- [Man] According to the Gang of Four, the indent for the bridge pattern is to decouple an abstraction from its implementation so that the two can vary independently. Now that's actually one of their more straight forward definitions. It's not too different from how I interpret it, which is that it's used to separate an abstraction from its implementation so both are modified independently. Let's take a peek at the class diagram. On the left hand side we have our abstraction, which defines an interface. It also maintains a reference to an object of the type implementor. Now right below it, we have a refined abstraction, which extends the interface defined by the abstraction above. On the upper right hand corner we have our implementor, which defines the interface for implementation classes. And right below it are the concrete implementors, which according to the Gang of Four, and this is kind of tricky to say, but it implements the implementor interface and defines it's concrete…

Contents