lundi 25 juin 2012

Elemental Design Pattern



Design patterns have become a crucial piece of most curriculum in software engineering. Few software engineering techniques have been as successful as design patterns. Whereas the relevance of design pattern is indeed uncontested, the ground on which they are built on is still unclear. 

The book provides a strong foundation that is both programming language agnostic and meaningful to practitioners. It gives high level discussions and concrete anecdotes about the necessity to consider design patterns not only as a "tribal muse" or Art, but also as a science. Elemental design patterns are about understanding the reason why design patterns are the way they are. 
From a practical point of view, the book distances practitioners from the classical description on design patterns. Instead of giving a recipe as most of other books do, it teaches how to make and taste a good dish. 

For example, the Decorator is a rather complex design pattern for which understanding its range of application is not easy to grasp. As soon as one face a situation different from a scholar one, then deciding the applicability of the Decorator brings its own bag of incertitudes. Smith argues that the Decorator pattern is composed of four elemental patterns: Abstract Interface, Inheritance, Trusted Redirection, and Extend Method. Each elemental pattern being is simple concept, which, when put all together, describe "a fairly high-level abstraction".

The book presents 16 elemental design patterns. It then gives 5 intermediate patterns, themselves used to express 6 design patterns. Although the author does not claim all design patterns can be expressed with elemental patterns, it makes a strong case about a possible generalization.

This book is not yet another description of design patterns. If you wish to know more about design patterns, then this book is probably not ideal, as the author suggests.  However, if you have a clear need to go one step further than the classical literature on the topic, then Elemental Design Pattern brings fresh ideas. 

In particular, experimented software engineers who need a tool to express new patterns will find this book insightful. Researchers on design patterns will also find the book appealing. An example that is unfortunately not mentioned by the authors but very relevant is about code understanding. Mining design patterns is known to be a hard task. Since design patterns are expressed in terms of elemental patterns, then mining elemental design patterns may bring new research perspective that have not been considered so far.