Design Patterns : Introduction and Taxonomy

An introduction to software design patterns with real-world examples

Vijayasri Iyer
2 min readAug 8, 2021

Design patterns are one of the most important topics in software engineering. Knowledge of design patterns are key to good program design. In this series of blog posts, I will attempt to combine my interest in food along with different design patterns to provide an in-depth explanation of each.

What are design patterns ?

In software engineering a design pattern is an elegant idea for solving a design problem. It abstracts the core of a design solution. The beauty of a design pattern is that it is generalizable and can be adapted to a problem in any domain with similar constraints.

“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.”

— Christopher Alexander (Author, ‘A Pattern Language’ )

Types of Design Patterns

There are different types of design patterns that deal with the creation, ordering and behavior of different components in a system. In this post, we will be exploring the design patterns as classified by the Gang of Four (GoF, design patterns). They can be divided into three categories

  1. Creational Patterns — Optimizing the process of class instantiation/creation
  2. Structural Patterns — Optimizing the structure of objects/classes in a system
  3. Behavioral Patterns — Optimizing the interaction between different objects/classes in a system

Creational Patterns

Creational Patterns are meant for specifically dealing with the instantiation/creation. The types of creational patterns are listed below.

  1. Factory Method
  2. Abstract Factory Method
  3. Builder Method
  4. Prototype Method
  5. Singleton Method

Structural Patterns

Structural design patterns are responsible for assembling multiple objects and classes into larger structures without compromising on flexibility and efficiency. The types of structural patterns are listed below

  1. Adapter Pattern
  2. Bridge Pattern
  3. Composite Pattern
  4. Decorator Pattern
  5. Facade Pattern
  6. Flyweight Pattern
  7. Proxy Pattern

Behavioral Patterns

As the name suggests, behavioral design patterns deal with the assignment of responsibilities to different classes and objects. The main aim of using a behavioral design pattern is to make the communication flow between classes easy and efficient. The types of behavioral patterns are listed below

  1. Chain of Responsibility
  2. Command Pattern
  3. Iterator Pattern
  4. Mediator Pattern
  5. Memento Pattern
  6. Observer Pattern
  7. State Pattern
  8. Strategy Pattern
  9. Template Method
  10. Visitor Pattern

In the next set of blogposts, we will see each design pattern in detail with an example. As these blogposts become available, they will be hyperlinked to the corresponding design patterns in this list. Till then, stay tuned !

References & Resources

  1. Refactoring Guru’s website and courses
  2. Springframework Guru
  3. Gang of Four, Design Patterns book
  4. Martin Fowler’s Website
  5. Design Patterns for Humans

--

--

Vijayasri Iyer

Machine Learning Scientist @ Pi School. MTech in AI. Musician. Yoga Instructor. Learnaholic. I write about anything that makes me curious.