Refactoring to Patterns - Thoughts on Test-Driven Development and Design Patterns and Extreme Programming

Joshua Kerievsky, the author of Refactoring to Patterns, appears to be a practitioner of Extreme Programming.  In the first chapter of Refactoring to Patterns, Why I Wrote This Book, Joshua talks a lot about how test-driven development, refactoring, and iterative development have impacted not only the way he develops applications, but also looks at design patterns.

Design patterns are typically thought about upfront when designing an application in anticipation of problems.  You immediately start applying design patterns based on unknown requirements to make the system as flexible as possible.  In some cases, you are essentially applying a sledgehammer to a problem that may only require a few small taps by a regular hammer.

Instead of thinking about design patterns as solutions to anticipated problems ( initial design ), design patterns are more richly understood during the refactoring process as solutions to problems that occur during the course of refactoring.  Design patterns are solutions to problems as they occur, not solutions to problems we think may occur!  Excellent point, Joshua.

Two sentences really stood out in the chapter about evolutionary design that deserve a highlight:

“To date, our software design literature has focused more on teaching great solutions than on teaching evolutions to great solutions.”

Hmm....  It's a great point.  The value in seeing a great solution is not so much in the solution itself, but the wealth of knowledge often lost in how the architects and developers arrived at the great solution.

“If you want to get the most out of patterns, you must ...  See patterns in the context of refactoring, not just as reusable elements that exist apart from refactoring.”  This is where the book Refactoring to Patterns comes in to play.

Yep, I am excited about this book!

posted on Sunday, December 19, 2004 12:04 PM

Main

News

Green Tea

.NET Development

Enterprise Library

Patterns & Practices