Pattern Knowledge

Prev don't be afraid of buying books Next

If you don't know patterns, you're less likely to evolve great designs. Patterns capture wisdom. Reusing that wisdom is extremely useful.

Maynard Solomon, a biographer of Mozart, observed that Mozart didn't invent new forms of music—he simply combined existing forms to produce stunningly good results [Solomon]. Patterns are like new forms of music you can use and combine to produce excellent software designs.

Knowledge of the Builder pattern once played a crucial role in the evolution of a system I helped develop. The system needed to run in two completely different environments. Had we not evolved the system to use the Builder pattern relatively early in our design, I shudder to think of how our design would have turned out.

JUnit, an excellent testing framework that enables test-driven development and unit testing, is dense with patterns. Its authors, Kent Beck and Erich Gamma, didn't try to put as many patterns into JUnit as they could. They simply evolved the framework and reused the wisdom of patterns as they designed. Since JUnit is an open source tool, I've been able to follow its evolution from version 1.0 to the latest version. By studying each version and by talking to Kent and Erich about their work, I can tell you that they definitely refactored to and towards patterns. Their knowledge of patterns most certainly aided them in their refactoring work.

Yet as I mentioned at the start of this book, having knowledge of patterns isn't enough to evolve great software. You must also know how to intelligently use patterns, which is the subject of this book. Nevertheless, if you don't study patterns, you'll lack access to important, even beautiful, design ideas.

My preferred way to gain knowledge of patterns is to choose great pattern books to study and then study one pattern a week in a study group. "Pools of Insight" [Kerievsky, PI], a pattern language I once wrote, describes how to set up a long-lasting patterns study group.

A study group I founded in 1995, called the Design Patterns Study Group of New York City, is still going strong today. The Silicon Valley Patterns Group is another long-running patterns study group. Some of its members enjoy it so much that they've actually moved closer to where the group meets, to make it easier to attend meetings.

Folks in these study groups love to become better software designers. Meeting and discussing important design ideas each week is a great way to do that.

If you think there are already too many patterns books to study, don't worry. Follow the advice of Jerry Weinberg. I once asked him how he keeps up with all the books that come out. He said, "Easy—I only read the great ones."

Amazon


Refactoring to Patterns (The Addison-Wesley Signature Series)
Refactoring to Patterns
ISBN: 0321213351
EAN: 2147483647
Year: 2003
Pages: 103

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net