Bridge
The bridge design pattern is more or less the same as the adapter design pattern with one exception. The adapter design pattern is intended to be used when you can't change the original API while the Bridge design pattern goes to the way the objects are built to have a shared API in advance.
Video Transcript
00:00Keep your ears out of tension because this is going to be a very short lecture
00:05Nothing hands-on just me talking for a few seconds
00:08The bridge design pattern is literally almost the same as the adopter design pattern and is if you're working on your own
00:16There really isn't a difference between a bridge and an adopter
00:19The only place where it starts becoming obvious
00:22the difference is is when you're working with other people's code that you can't change such as third-party tools or you're working in a team and
00:30Let's break it down an adopter it that we met in the last section is created after the fact
00:36So you already have an object. It already has an API and you need to change it
00:41Contrary to that a bridge is really created in advance while you're creating the classes and you're creating a bridge that will facilitate
00:49communications in many ways, it's like
00:52TV remote controls all work more or less the same way because they have the same
00:58Interface, although they do a little bit different things
01:00But that's why a global remote control could control almost every television because the differences are so minute
01:05The idea with a bridge is to make sure that you're creating all these different classes that they're adhering to the same interface
01:12That they're gonna work and it's exact same type of mythology and logic that stands behind an adopter
01:18That is after the fact. Oh, oops
01:20We need to something that has these methods and it doesn't have these methods
01:24So let's create them and that's really the difference between the bridge and an adopter and with that said we're done with this lecture
01:30And in the next lecture, we're going to meet the proxy design pattern
