5 Keys to Authoring Successful Patterns
Patterns are not a panacea, but they can improve productivity and quality. Peter Varhol offers five practices that can help you integrate patterns into your development efforts successfully.
- By Peter Varhol
he use of patterns offers the most significant potential for software reuse since the widespread adoption of object-oriented programming techniques. Many development organizations have organized pattern libraries and have assigned architects and senior developers to fill them up with patterns that will deliver both high productivity and implementation consistency across different teams and applications.
But like most new concepts, a pattern strategy is only as good as the thought and efforts placed behind it. Here are five practices that can help in creating useful patterns that can actually deliver on that promise.
1. Look everywhere for patterns. Don't let the "not invented here" syndrome blind you to good work being done elsewhere on your development teams, or even in communities on the Internet.
2. Carefully define the scope and limitations of the pattern. A major failure of a pattern strategy is that the users of the patterns tend to think the patterns can be adapted and used far beyond their intended purpose.
3. Provide a sample implementation of the pattern. Descriptions of solutions are useful, but what many developers really want is an example for them to modify to meet their specific needs, or at least to give them a concrete idea of what they are trying to do. Providing a sample implementation with a pattern makes it much more likely that it will be applied across different applications.
4. Publicize the availability of the pattern. Pattern strategies also fail because development teams don't know about them, or can't find the libraries once they decide to go looking. It's not good enough to create patterns and file them away without anyone using them. Instead, offer regular internal seminars and workshops on new patterns, and publish a regular e-mail or Web page listing patterns and their uses.
5. Test the pattern in an actual application and refine if necessary. Many patterns look great on paper, but don't work well in practice. Audit and performance-test applications that adopt the pattern, and use that information to feed back to the pattern to make it better.
Patterns are not a panacea to software reuse and implementation consistency, but they can improve both productivity and quality within a development process. Following these practices will help to integrate successful patterns more closely into existing development efforts.
Peter Varhol is a principal at Technology Strategy Research LLC, an industry analysis and consulting firm.