Bridge Design Pattern - HowToDoInJava
Bridge Design Pattern Bridge design pattern is used to decouple a class into two parts -- abstraction and it's implementation -- so that both can evolve in future without affecting each other. It increases the loose coupling between class abstraction and it's implementation. Decouple an abstraction from its implementation so that the two can vary independently. Bridge is a synonym for the "handle/body" idiom. This is a design mechanism that encapsulates an implementation class inside of an interface class. The former is the body, and the latter is the handle. The handle is viewed by the user as the actual class, but the work is done in the body. You get this decoupling by adding one more redirection between methods calls from abstraction to implementation. Design participants of bridge design pattern Bridge pattern participants Abstraction (abstract class) It defined the abstract interface i.e. behavior part. It also maintains the Implementer reference.Read full article from Bridge Design Pattern - HowToDoInJava
No comments:
Post a Comment