5 reasons to finally learn design patterns
If you’ve encountered design patterns only in passing, in a nutshell, they’re general object-oriented solutions that you can use in your own designs. Crafted by experienced object-oriented practitioners, design patterns can make your designs more flexible, more resilient to change, and easier to maintain. So, if design patterns still aren’t part of your development toolbelt, here are five reasons you should add them.
1: Make your life easier by not reinventing the wheel
There’s a constant in software development, and no, it isn’t that projects will always ship late and over budget. It’s change. Change occurs when requirements change, systems grow, new features are added, when performance is optimized, and we’re sure you can think of a few more reasons why change happens. The question is, how can you build software so the impact of this change is minimized? After all, some of the most difficult aspects of software development are understanding existing code (perhaps written by others), and altering existing code without introducing new defects or unintended consequences.
So, what’s the answer? There isn’t one magic bullet, but there are techniques you can use to help you make your object-oriented designs more resilient to change. These are hard-won techniques that have been developed through the experience of experts, and they’ve been cataloged for you. They’re called design patterns, and they provide ready-made design templates that can be applied to your own designs to solve common problems. They’re not libraries or modules; they’re guidelines you integrate into the core of your designs, giving you a leg up in creating flexible and maintainable object-oriented systems.
So, why reinvent a (bad) wheel when you can use the hard-earned experience of the best object-oriented designers?
Continue reading this article by Eric Freeman and Elisabeth Robson at O’Reilly.com.