Design Patterns and You: The Bridge

In the spirit of the last post, I want to talk about another design pattern that’s useful in a wide range of Java development cases, and for which I think better tooling support (maybe in the form of a JDeveloper addin!) would be very useful: The bridge, also known as the driver. You’re probably familiar with the term “driver,” at least in the sense of device or JDBC drivers, and as we’ll see, there’s a reason why the driver pattern shares a name with them.

The stated purpose of this pattern is to “decouple an abstraction from its implementation so that the two can vary independently.” This may not make much sense at first, so we’ll start with a concrete example.

Continue reading Design Patterns and You: The Bridge