Saturday, November 3, 2012

bridge pattern



  • bridge pattern

The bridge pattern is a design pattern used in software engineering which is meant to "decouple an abstraction from its implementation so that the two can vary independently
The bridge uses encapsulation, aggregation, and can use inheritance to separate responsibilities into different classes
http://en.wikipedia.org/wiki/Bridge_pattern


  • Usages 


  1. when you want to avoid permanent binding between abstraction and its implementation
  2. when you want to let abstractions and their implementations be extensible by subclassing
  3. changes in the implementation of abstractions should have no impact on clients so that client codes should not be recompiled
  4. mostly used in drivers like database drivers

No comments:

Post a Comment