In October, 2011 I published an article (in Portuguese) features as the cover of Java Magazine #98, about principles, discussions and reflections about using designing patterns, in order to help the reader to develop critical sense about them. This way, the reader can extract knowledge from himself in order to apply design patterns moderately.
The article presents reflections about using design patterns, and shows some common causes for their misuse, besides some bad implementation examples. Next, introduces the GRASP principles and its relation with the design patterns, in order to guide the developer to use them adequately. Lastly, raises some questions to evaluate the implementation of a design pattern and considerations for the reader to develop critical sense.
When is the subject useful
The subject is useful for alerting the developer about the proper use of design patterns, which are solutions for certain problems, but could be problems for certain solutions. It is important to the developer know how to judge the usage of a design pattern in a particular context, evaluating its applicability and consequences, aiming for a optimal solution.
- Core J2EE Pattern Catalog J2EE design patterns catalog.
- Singletonitis Antonio Vieiro describes the disease “Singletonitis”.
- Over Use Of Patterns Anti-patterns catalog related with the design patterns abuse.
- Integrating design patterns “just before they become useful” Chandima Cumaranatunge explains how to integrate design pattern just before they become useful.
- Applying UML and Patterns - Craig Larman A reference book about the GRASP principles, exposing them in a clear and consistent way.
- Design Patterns: Elements of Reusable Object-Oriented Software - Gang of Four The official catalog of GoF design patterns.
- Refactoring: Improving the Design of Existing Code - Martin Fowler A book about the agile refactoring process. Discuss much about problems caused by design patterns.
- Head First Design Patterns - Elizabeth Freeman A very didactic book about design patterns, presents many interesting reflections.