< Day Day Up > |
Although a design pattern evolves from experiences in a positive manner, antipatterns can be thought of as collections of experiences that have gone awry. It is well documented that most software projects are ultimately deemed unsuccessful . In fact, as indicated in the article "Creating Chaos" by Johnny Johnson, fully one-third of all projects are cancelled outright . It would seem obvious that many of these failures are caused by poor design decisions. The term antipattern derives from the fact that design patterns are created to proactively solve a specific type of problem. An antipattern, on the other hand, is a reaction to a problem, and is gleaned from bad experiences. In short, whereas design patterns are based on solid design practices, antipatterns can be thought of as practices to avoid. In the November 1995 C++ Report , Andrew Koenig described two facets of antipatterns:
Many people believe that antipatterns are actually more useful than design patterns. This is because antipatterns are designed to solve problems that have already occurred. This boils down to the concept of root-cause analysis. A study can be conducted with actual data that might indicate why the original design, perhaps an actual design pattern, did not succeed. It might be said that antipatterns emerge from the failure of previous solutions. Thus, antipatterns have the benefit of hindsight. For example, in his article "Reuse Patterns and Antipatterns," Scott Ambler identifies a pattern called a robust artifact , and defines it as follows :
However, there are certainly many situations when a solution is declared reusable and then no one ever reuses it. Thus, to illustrate an antipattern, he writes :
Thus, antipatterns lead to the revision of existing designs, and the continuous refactoring of those designs until a workable solution is found. |
< Day Day Up > |