The Relevance of Design Patterns

The Gang of Four book, Design Patterns: Elements of Reusable Object-Oriented Software, describes essential design patterns and gives valued advice about software engineering practices. When I first read that book I was amazed about how much I had to learn to improve my approach to developing software. It is not a book one should simply read from cover to cover, but it should rather be carefully studied over the course of one’s software engineering career.

It is common hearing someone ask if the design patterns described on the Gang of For book are still relevant. From my experience, I would say that the content of the book is relevant and will continue relevant for many years ahead. Those design patterns were devised with the purpose of solving specific issues software architects and developers face. The specific issues they address can be tackled by programming language features, however, no programming language until now has managed to provide solutions for all the issues those patterns cover. Hence, the need to study them carefully. No matter how cutting edge your programming language and frameworks are, learn the Gang of Four patterns or end up, as the adage says, “reinventing the wheel” (and probably one of much lower quality).

Here are some strategies I came up with in order to understand design patters well:

  1. Understand how patterns are grouped: Creational, Structural and Behavioral
  2. Focus your study on patterns of a single group so you can study with a specific objective in mind (Improve how I deal with object creation in my code, for instance).
  3. Study the applicability, advantages and disadvantages of the pattern.

By doing that, you will be able to retain deep knowledge of the pattern without simply knowing that it exits. One easy way to spot if a developer has solid understanding of design patterns one can check if he/she knows the disadvantages of that pattern. Most developers learn what a pattern is good for, but not its weaknesses.

Finally, the whole point of studying the Gang of Four book is not to simply go through the daunting task of learning all 23 patterns down to the detail. The true goal is to be able to exercise your mind to apply correct design solutions and think in a more abstract and mature way as a software engineer.

Leave a comment