Introducing the Adapter Pattern

According to the Gang of Four, the intent of the Adapter pattern is to

Convert the interface of a class into another interface that the clients expect. Adapter lets classes work together that could not otherwise because of incompatible interfaces.[1]

[1] Gamma, E., Helm, R., Johnson, R., Vlissides, J., Design Patterns: Elements of Reusable Object-Oriented Software, Reading, Mass.: Addison-Wesley, 1995, p. 185.

Basically, this is saying that we need a way to create a new interface for an object that does the right stuff but has the wrong interface.

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

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