Better Software - March 2008 - (Page 46) by Alan Shalloway and Rob Myers PatternS are not “SolutionS to a ProbleM in a context.” This definition was originally applied to patterns as a teaching tool. Once patterns are understood, this definition tends to be limiting—and potentially counterproductive. In fact… deSign PatternS are wayS of thinking. Patterns are really about identifing common problems and then solving them. Patterns provide a set of issues (“forces”) that the developer must address. They also present potential ways to resolve these forces and provide a language with which to communicate about these forces. deSign PatternS are about handling variation. In software, most of these forces relate to how the code must adapt to change or how changing requirements affect the code. This is one of the greatest problems in writing code: dealing with change. Patterns can help us inject new functionality into our code in a way that keeps the code quality high. Which is why… agile Software develoPMent MakeS PatternS More iMPortant than ever. If you are using agile methods, change is truly a way of life. Design patterns help you accommodate this change. deSign PatternS are aS Much about analySiS aS about deSign. Design patterns start with an intention to be implemented. This intention is really defined while analyzing the problem. Hence… the uMl deSign of a Pattern iS not a good indicator that you have a Pattern PreSent. Many of the implementations of design patterns look alike, particularly their corresponding UML diagrams. What differentiates one pattern from another are the forces involved and how they are resolved. PatternS cannot be overuSed. When you use design patterns appropriately, you are thinking in a better, more effective manner. This thought process will guide you into a design and implementation that fits the problem. If you force-fit what someone might call a pattern implementation into a problem where it doesn’t belong, you are not following the pattern thought process and are therefore not using the pattern properly. deSign PatternS uSe the SaMe PrinciPleS aS teSt-driven develoPMent (tdd). Both rely on essential code qualities such as cohesive, decoupled objects, and both resolve forces. Patterns help a good TDD practitioner follow a primary rule of TDD: Never create redundancy. Patterns are very much about this. you often evolve your deSignS to PatternS. Thinking in patterns means handling variation when it becomes present in a manner that maintains high code quality. Patterns handle variation by “finding what varies and encapsulating it.” You can do this once variations start to occur. Thus, you can start with a simple solution and evolve to the pattern as the forces require. PatternS are SeriouSly MiSunderStood. You’ve probably figured this out by now! 46 BETTER SOFTWARE MARCH 2008 www.StickyMinds.com http://www.StickyMinds.com
Table of Contents Feed for the Digital Edition of Better Software - March 2008 Better Software - March 2008 Contents Mark Your Calendar Contributors eLightenment Technically Speaking Code Craft Test Connection Management Chronicles Cover Story: Breaking Ground On SOA Software Development Worst Practices Mind the Gap Product Announcements 10 Things You Might Not Know About... The Last Word Ad Index Better Software - March 2008 Better Software - March 2008 - (Page Intro) Better Software - March 2008 - Better Software - March 2008 (Page Cover1) Better Software - March 2008 - Better Software - March 2008 (Page Cover2) Better Software - March 2008 - Better Software - March 2008 (Page 1) Better Software - March 2008 - Better Software - March 2008 (Page 2) Better Software - March 2008 - Contents (Page 3) Better Software - March 2008 - Mark Your Calendar (Page 4) Better Software - March 2008 - Mark Your Calendar (Page 5) Better Software - March 2008 - Contributors (Page 6) Better Software - March 2008 - Contributors (Page 7) Better Software - March 2008 - eLightenment (Page 8) Better Software - March 2008 - eLightenment (Page wp1) Better Software - March 2008 - eLightenment (Page wp2) Better Software - March 2008 - eLightenment (Page 9) Better Software - March 2008 - eLightenment (Page 10) Better Software - March 2008 - eLightenment (Page 11) Better Software - March 2008 - eLightenment (Page 12) Better Software - March 2008 - Technically Speaking (Page 13) Better Software - March 2008 - Code Craft (Page 14) Better Software - March 2008 - Code Craft (Page 15) Better Software - March 2008 - Code Craft (Page 16) Better Software - March 2008 - Code Craft (Page 17) Better Software - March 2008 - Test Connection (Page 18) Better Software - March 2008 - Test Connection (Page 19) Better Software - March 2008 - Management Chronicles (Page 20) Better Software - March 2008 - Management Chronicles (Page 21) Better Software - March 2008 - Management Chronicles (Page 22) Better Software - March 2008 - Management Chronicles (Page 23) Better Software - March 2008 - Cover Story: Breaking Ground On SOA (Page 24) Better Software - March 2008 - Cover Story: Breaking Ground On SOA (Page 25) Better Software - March 2008 - Cover Story: Breaking Ground On SOA (Page 26) Better Software - March 2008 - Cover Story: Breaking Ground On SOA (Page 27) Better Software - March 2008 - Cover Story: Breaking Ground On SOA (Page 28) Better Software - March 2008 - Cover Story: Breaking Ground On SOA (Page 29) Better Software - March 2008 - Cover Story: Breaking Ground On SOA (Page 30) Better Software - March 2008 - Cover Story: Breaking Ground On SOA (Page 31) Better Software - March 2008 - Software Development Worst Practices (Page 32) Better Software - March 2008 - Software Development Worst Practices (Page 33) Better Software - March 2008 - Software Development Worst Practices (Page 34) Better Software - March 2008 - Software Development Worst Practices (Page 35) Better Software - March 2008 - Software Development Worst Practices (Page 36) Better Software - March 2008 - Software Development Worst Practices (Page 37) Better Software - March 2008 - Mind the Gap (Page 38) Better Software - March 2008 - Mind the Gap (Page 39) Better Software - March 2008 - Mind the Gap (Page 40) Better Software - March 2008 - Mind the Gap (Page 41) Better Software - March 2008 - Mind the Gap (Page 42) Better Software - March 2008 - Mind the Gap (Page 43) Better Software - March 2008 - Mind the Gap (Page 44) Better Software - March 2008 - Product Announcements (Page 45) Better Software - March 2008 - 10 Things You Might Not Know About... (Page 46) Better Software - March 2008 - The Last Word (Page 47) Better Software - March 2008 - Ad Index (Page 48) Better Software - March 2008 - Ad Index (Page Cover3) Better Software - March 2008 - Ad Index (Page Cover4)
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.