Design Pattern Evangelist Blog

Smart pointers about software design

The Big Wheel Keeps on Turning

Design patterns have been around for a long time


Big Wheel Keeps on Turning

The Gang of Four (GoF) popularized software design patterns, in their book Design Patterns, but they didn’t originate the concept. Design patterns have their formal roots in the world of architecture from Christopher Alexender, et al. in the four-volume set: A Pattern Language: Towns, Buildings, Construction published in 1977:

The elements of this language are entities called patterns. Each pattern describes a problem that occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice.

I think that patterns have been around a lot longer than that, even for millennia. I consider the Wheel a design pattern in the mechanical domain. There is no one wheel that works in all scenarios. There are many types of wheels such as: pottery wheels, water wheels, wagon wheels, hamster wheels, Ferris wheels, and even wheels we no longer call wheels, such as pulleys and gears.

In each case, the designer has the design concept of a wheel with an axle at his or her disposal to solve a problem. The wheel drives the axle, or the axle drives the wheel. But this is only a starting point. Each wheel must be designed appropriately for the context of each individual use case.

Mayan Calendar

The wheel feels obvious to us since it’s so ubiquitous, but it took centuries if not millennia to perfect. Pre-Columbian indigenous peoples in the Americas, even with their own sophisticated technology, never developed it.

In 1995 the GoF brought design patterns into the software world when they cataloged software design patterns in their book. This catalog consisted of patterns that were presented at conferences during that time. Software Design Patterns History provides a summary of others who were defining software design patterns at about the same time. The GoF design patterns fall mostly within the paradigm of Object-Oriented languages, but design patterns are not limited to just Object-Oriented paradigms. Software Design Patterns Classification and List summarizes the GoF patterns plus some not cataloged by the GoF.

The GoF defined a set of attributes to describe each design pattern such as name, intent, structure, code samples, etc. More attribute details can be found in Software Design Pattern Documentation. While not necessarily GoF attributes, here are some design pattern attributes that I find most beneficial:

The design pattern properties I listed above apply to data structures and algorithms as well. So why aren’t design patterns considered data structures or algorithms?

I think the distinction goes back to being a software cook verses being a software chef. Data structures and algorithms are like recipes that all software cooks can follow. Design patterns are like culinary techniques that only the skilled software chef knows how to apply.

How To Cook Swedish Chef Muppet

Comments

Previous: Problem Solvers

Next: Put More Tools in your Toolbox

Home: Design Pattern Evangelist Blog