/*
Author: Jiangong SUN
*/
There are 4 categories of design patterns called Gang of Four(GoF):
- Creational patterns
- Structural patterns
- Behavior patterns
- Concurrency patterns
Adapter pattern is a structural pattern.
Adapter pattern definition: Convert the interface of a class into another interface clients expect. An adapter lets classes work together that could not otherwise because of incompatible interfaces. The enterprise integration pattern equivalent is the translator.
UML:
For example, there are 2 targets that 2 different clients expects.
reference:
http://www.codeproject.com/Articles/342082/Understanding-and-Implementing-the-Adapter-Pattern
http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29#Classification_and_list
http://www.dofactory.com/Patterns/PatternAdapter.aspx
http://stackoverflow.com/questions/1673841/examples-of-gof-design-patterns
http://msdn.microsoft.com/en-us/library/orm-9780596527730-01-04.aspx
http://stackoverflow.com/questions/1299167/understanding-adapter-pattern