“I think patterns as a whole can help people learn object-oriented thinking: how you can leverage polymorphism, design for composition, delegation, balance responsibilities, and provide pluggable behavior. Patterns go beyond applying objects to some graphical shape example, with a shape class hierarchy and some polymorphic draw method. You really learn about polymorphism when you’ve understood the patterns. So patterns are good for learning OO and design in general.”
Learning about patterns is also learning about Object Orientation, since patterns are OO applied to certain types of problems. Erich really liked the Head First Design Patterns book as a resource for learning patterns.
Developers just starting to learn design patterns often suffer from design pattern-itis, that is, they think “I need a new object, so I’ll use an Abstract Factory.” But don’t start your application with patterns:
“Do not start immediately throwing patterns into a design, but use them as you go and understand more of the problem. Because of this I really like to use patterns after the fact, refactoring to patterns.”
That is why Joshua Kerievsky’s book Refactoring to Patterns is such a crucial book. (I haven’t studied it extensively yet, but I’ve read parts of it and it’s excellent.) Not starting with patterns allows the architecture to emerge around an application’s abstractions:
“That’s something you can often observe in mature designs. There are some key abstractions you often see as a design center, and around those key abstractions you want to achieve various things. So you see patterns growing out of such a center.”