What is a design pattern?

From Wikipedia :

a design pattern is a general repeatable solution to a commonly occurring problem in software design.

Algorithms are not thought of as design patterns, since they solve computational problems rather than design problems.

Patterns originated as an architectural concept by Christopher Alexander (1977/79).
“Each pattern describes a problem which 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”.

This was said with reference to architectural patterns, however, holds equally true for software design problems, and indeed any problem space.

Anti-patterns are specific repeated practices that appear initially to be beneficial, but ultimately result in bad consequences that outweigh the hoped-for advantages.


About this entry