3 ms·
I found both his definition of the adapter pattern and his example to be a bit off. In his example, the adapter extends the external interface instead of the cl
by rootlocus 10y ago
I found both his definition of the adapter pattern and his example to be a bit off. In his example, the adapter extends the external interface instead of the client interface. By definition the adapter must implement the client interface. It's even in the UML diagram displayed on the website he quotes (http://www.dofactory.com/net/adapter-design-pattern http://www.dofactory.com/net/adapter-design-pattern)
> The fact was that I just didn't understand them the way I thought I did.
> To be clear, I've never read the Gang of Four book these patterns are defined in
After admitting he has a less than desired understanding of design patterns (proven by his poor example), he makes bold claims like:
> if you ever find yourself thinking, "I know, I'll use a design pattern" before writing any code, you're doing it wrong.
I'm having problems taking this article seriously.