Bridge Design Pattern – Concepts Code Examples

Posted by admin on August 24, 2009 under Software Architect | Be the First to Comment

Bridge pattern is useful when both the class as well as what it does varies. The class itself can be thought of as the. The bridge pattern can also be thought of as two layers of abstraction. : the implementation can be decoupled even more by deferring the presence of the implementation to the point where the abstraction is utilized.




Bridge pattern is great when used as a base of cross-platform frameworks. You want to localize platform-specific code, thus making your scripts easy to extend and maintain. You want to localize browser/feature/object detection code. To do it; the structure of the bridge pattern.

Bridge pattern is classified as a structural design pattern. This pattern helps to hide the implementation details giving more encapsulation. As the interface implementations and abstractions are decoupled , they can have hierarchies. Changing an implementation needn’t require any compilation of abstractions or its clients. This provides a better layering structure than having the traditional abstract implementation of parent interfaces.

References on Bridge Design Pattern

  1. The Bridge Design Pattern – A quick look at Bridge pattern
  2. Bridge Design Pattern in C# and VB.NET. – Bridge Design Pattern C# and VB.NET. Beyond OO Design and Development. Valuable source code and UML
  3. Bridge Design Pattern – The Bridge pattern decouples an abstraction from its implementation, so that the two can vary independently. Publish interface in an inheritance hierarchy, and bury implementation in its own inheritance hierarchy.
  4. Bridge Design Pattern in Java – Bridge design pattern Java source code example.
  5. Design Patterns : Bridge – At The Byte Scrolls Website

Bridge pattern is useful when there is a hierarchy of abstractions anda corresponding hierarchy of implementations. Rather than combining the abstractions and implementations into many distinct classes, the bridge pattern implements the abstractions and implementations as independent classes that can be combined dynamically. The bridge design pattern is a way of organizing the entities identified using the layered architecture pattern into classes. The abstract factory pattern can be used by the bridge pattern to decide which implementation class to instantiate for an abstraction object.

Share This Post