Design Pattern Modules
Learn PHP design patterns through interactive coding challenges. Work through the modules in order — each builds on the one before.
OOP Basics Refresher
Classes, interfaces, abstract classes, visibility, type hinting, late static binding.
SRP, OCP & DIP
Single Responsibility, Open/Closed, and Dependency Inversion — the three principles you'll use in Modules 1-3.
LSP, ISP & Composition
Liskov Substitution, Interface Segregation, and Composition over Inheritance.
Dependency Injection / IoC
Learn how to decouple classes by injecting dependencies rather than hardcoding them.
Service Pattern
Encapsulate business logic in dedicated service classes to keep controllers thin and logic reusable.
Repository Pattern
Abstract data access behind an interface so your business logic never depends on a specific storage mechanism.
Factory Method
Centralise object creation so client code never needs to know which concrete class to instantiate.
Data Transfer Object (DTO)
Carry structured data between layers with type safety instead of raw arrays.
Strategy Pattern
Swap algorithms or behaviours at runtime by encapsulating each one behind a common interface.
Adapter Pattern
Convert an incompatible interface into one your application expects.
Command Pattern
Encapsulate requests as objects to support queuing, logging, and undo operations.