How Design Patterns Encapsulate Implementations

Several of the design patterns I have presented have the characteristic that they shield implementation details from a Client object. For example, the Bridge pattern hides from the Client how the classes derived from the Abstraction are implemented. Additionally, the Implementation interface hides the family of implementations from the Abstraction and its derivations as well. In the Strategy pattern, the implementations of each ConcreteStrategy are hidden. This is true of most of the patterns described by the Gang of Four: they give ways to hide specific implementations.

The value of hiding the implementations is that the patterns allow for easily adding new implementations, since the client objects do not know how the current implementation works.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.21.109