In this article we will learn about what is a design pattern. In particular we will learn the definition of a design pattern and its essential elements.
According to Christopher Alexander,
“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.”
Definition (In Software Development):
Design patterns are repeatable or reusable solutions to commonly occurring problems in a certain context in software design.
Four essential elements of a design pattern:
The four essential elements of a design pattern are:
Pattern name: The pattern name provides a way to describe the design problem, its solution and consequences in a word or two. A pattern name provides vocabulary using which we can communicate with other people, document them and reference them in software designs. Finding a good name for a design pattern is a major issue.
Problem: The problem describes when to apply the pattern and in which context to apply the pattern. The problem may describe the class and object structures in a bad design context. Sometimes, the problem might also list out the conditions that must be pre satisfied to apply the pattern.
Solution: The solution describes the elements (classes and objects) that make up the design, their relationships, responsibilities and collaborations. The solution does not describe a particular concrete design or implementation (no code). A pattern is a template that can be applied in many different situations.
Consequences: These are the costs and benefits of applying the patterns. These consequences involve space and time trade-offs, language and implementation issues as well as the effect of pattern on system’s flexibility, extensibility or portability. Listing these consequences explicitly enables us to understand and evaluate them.

Suryateja Pericherla, at present is a Research Scholar (full-time Ph.D.) in the Dept. of Computer Science & Systems Engineering at Andhra University, Visakhapatnam. Previously worked as an Associate Professor in the Dept. of CSE at Vishnu Institute of Technology, India.
He has 11+ years of teaching experience and is an individual researcher whose research interests are Cloud Computing, Internet of Things, Computer Security, Network Security and Blockchain.
He is a member of professional societies like IEEE, ACM, CSI and ISCA. He published several research papers which are indexed by SCIE, WoS, Scopus, Springer and others.
Leave a Reply