Skip to main content
Design Patterns for Humans

Ultra-simplified explanation to design patterns

A topic that can easily make anyone’s mind wobble. Here I try to make them stick in to your mind (and maybe mine) by explaining them in the simplest way possible.

Creational Patterns

Focused on how to instantiate an object or group of related objects

Structural Patterns

Concerned with object composition and relationships between entities

Behavioral Patterns

Focused on assignment of responsibilities and communication between objects

What You’ll Learn

This guide covers 23 essential design patterns, organized into three main categories:

Creational Design Patterns

Learn how to create objects in a manner suitable to your situation:
  • Simple Factory
  • Factory Method
  • Abstract Factory
  • Builder
  • Prototype
  • Singleton

Structural Design Patterns

Understand how to build software components and compose objects:
  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Facade
  • Flyweight
  • Proxy

Behavioral Design Patterns

Master communication patterns and responsibility assignment:
  • Chain of Responsibility
  • Command
  • Iterator
  • Mediator
  • Memento
  • Observer
  • Visitor
  • Strategy
  • State
  • Template Method
Be Careful
  • Design patterns are not a silver bullet to all your problems
  • Do not try to force them; bad things are supposed to happen, if done so
  • Keep in mind that design patterns are solutions to problems, not solutions finding problems; so don’t overthink
  • If used in a correct place in a correct manner, they can prove to be a savior; or else they can result in a horrible mess of a code
The code samples in this guide are in PHP-7, however this shouldn’t stop you because the concepts are same anyways.

Get Started

Ready to dive in? Start by understanding what design patterns are and why they matter, then explore each category to find the patterns that solve your specific problems.

Build docs developers (and LLMs) love