
Software Design – The Adapter Pattern
The Adapter Pattern is one of the easiest to understand and relate to the real world. We see adapters used every day and they have become a critical factor in our daily success. Almost every device we have utilizes an adapter in some way. The Adapter Pattern Defined As always, we will start with the “Gang of Four” definition to set the stage for our discussion. “Ensure a class only has one instance, and provide a global point of access to it.” There are many names for an adapter pattern. However, they all imply the same thing. The implementation boils down to a translator between two parties. A commonly experienced real-world example is a power or recharging adapter. These accessories translate the power... Read more