design-patterns

    Design Patterns Course

    Design Patterns: From Code Smells to Enterprise Architecture Mastery — GoF, SOLID, enterprise patterns and interview prep.

    70
    Lessons
    9
    Modules
    0/70
    Completed
    Curriculum

    Enterprise learning path

    9 modules · 70 lessons

    Foundations & Code Smells

    0/7 complete
    1. 1
      Design Patterns Home
      Next up

      Welcome to Design Patterns: From Code Smells to Enterprise Architecture Mastery — a mentor-led course built for engineers who want judgment, not flashcards.

    2. 2
      What Are Design Patterns?

      Design patterns are not code you copy — they are named structures that crystallize decades of hard-won engineering judgment.

    3. 3
      The Gang of Four Legacy

      In 1994, four engineers — Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides — published Design Patterns: Elements of Reusable Object-Oriented Software.

    4. 4
      Why Patterns Are Not Silver Bullets

      Every junior engineer who reads the GoF book wants to apply 23 patterns to their first project.

    5. 5
      Code Smells That Beg for Patterns

      Code smells are Fowler's term for surface symptoms of deeper design problems.

    6. 6
      Recognizing Change Points

      Change points are the heart of pattern selection.

    7. 7
      The Pattern Selection Framework

      Pattern selection is where engineers most often lose composure — too many patterns, too many trade-offs, too much taste.

    SOLID & OOP Thinking

    0/8 complete
    1. 8
      OOP Recap for Pattern Thinkers

      Most OOP refreshers teach the four pillars as definitions.

    2. 9
      SOLID Principles Overview

      SOLID is the five-principle discipline that makes object-oriented design tractable at scale.

    3. 10
      Single Responsibility in Practice

      Single Responsibility sounds obvious and is the most violated principle in practice.

    4. 11
      Open/Closed Principle

      Open/Closed is the principle Strategy, Factory Method, Decorator, and plugin systems implement: add new behavior by extending, not by editing stable code.

    5. 12
      Liskov Substitution

      Liskov Substitution demands that subtypes honor the base contract.

    6. 13
      Interface Segregation

      Interface Segregation splits fat interfaces so clients depend only on methods they use.

    7. 14
      Dependency Inversion

      Dependency Inversion makes testing and infrastructure swaps possible.

    8. 15
      Composition Over Inheritance

      Composition over inheritance is the modern default.

    Creational Patterns

    0/8 complete
    1. 16
      Singleton Pattern

      Singleton guarantees exactly one instance of a class per process and exposes a global access point.

    2. 17
      Singleton Pitfalls & Alternatives

      The problem with Singleton isn't always "one instance" — that's often correct.

    3. 18
      Factory Method

      Factory Method moves the decision of which concrete class to create out of the consumer and into a dedicated method.

    4. 19
      Abstract Factory

      Abstract Factory produces a family of related objects designed to work together — not one product at a time.

    5. 20
      Builder Pattern

      Builder turns long, error-prone constructor calls into readable, validated, step-by-step assembly.

    6. 21
      Prototype Pattern

      Prototype creates new objects by cloning an existing instance rather than calling a constructor.

    7. 22
      Object Pool Pattern

      Object Pool caps expensive resources alive at once and amortises construction cost.

    8. 23
      Dependency Injection vs Singleton

      Dependency Injection vs Singleton clarifies an common confusion: DI and Singleton solve overlapping but distinct problems.

    Structural Patterns

    0/8 complete
    1. 24
      Adapter Pattern

      Adapter (Wrapper) bridges two incompatible interfaces.

    2. 25
      Facade Pattern

      Facade hides complexity of a multi-class subsystem behind a small, purpose-built API.

    3. 26
      Decorator Pattern

      Decorator wraps an object that shares its interface and adds behaviour before/after delegating to the original.

    4. 27
      Proxy Pattern

      Proxy stands in for a real object and intercepts every call — same interface, different responsibilities.

    5. 28
      Composite Pattern

      Composite lets a single object and a group share the same interface, so callers recurse a tree without caring whether a node is leaf or branch.

    6. 29
      Bridge Pattern

      Bridge splits one class hierarchy into two independent axes: abstraction (what the client uses) and implementation (how work is done).

    7. 30
      Flyweight Pattern

      Flyweight reduces memory by sharing one immutable instance among many logical objects.

    8. 31
      Structural Patterns in Microservices

      Structural Patterns in Microservices maps GoF structural patterns onto network boundaries.

    Behavioral Patterns

    0/11 complete
    1. 32
      Strategy Pattern

      Strategy turns a conditional that selects an algorithm into a polymorphic call.

    2. 33
      Observer Pattern

      Observer (Publish/Subscribe at object level) decouples event sources from handlers.

    3. 34
      Command Pattern

      Command turns a method call into a first-class object you can store, queue, schedule, undo, log, or replay.

    4. 35
      State Pattern

      State models a context that behaves differently depending on which state object it holds.

    5. 36
      Template Method

      Template Method fixes the order of a multi-step algorithm in a base class and lets subclasses override variable steps.

    6. 37
      Iterator Pattern

      Iterator separates traversal from storage.

    7. 38
      Chain of Responsibility

      Chain of Responsibility arranges handlers in sequence; each handles the request or passes to next.

    8. 39
      Mediator Pattern

      Mediator centralises conversation between colleagues.

    9. 40
      Memento Pattern

      Memento powers undo, snapshotting, checkpointing, and save-game.

    10. 41
      Visitor Pattern

      Visitor separates algorithms from the structures they operate on.

    11. 42
      Behavioral Patterns in Event Systems

      Behavioral Patterns in Event Systems composes Observer, Command, State, Mediator, and Chain of Responsibility into coherent event-driven architecture.

    Enterprise Architecture Patterns

    0/13 complete
    1. 43
      Layered Architecture

      Layered Architecture stacks the application in horizontal layers — presentation, application, domain, infrastructure — each depending only on layers below.

    2. 44
      Hexagonal Architecture

      Hexagonal Architecture (Ports and Adapters) puts domain at the center.

    3. 45
      Clean Architecture

      Clean Architecture (Uncle Bob) codifies concentric layers: Entities → Use Cases → Interface Adapters → Frameworks.

    4. 46
      Repository Pattern

      Repository mediates between domain and persistence with a collection-like interface: findById, save, delete — without exposing SQL, ORM, or table shapes.

    5. 47
      Unit of Work

      Unit of Work tracks changes to multiple aggregates during a business transaction and commits them atomically.

    6. 48
      CQRS Pattern

      CQRS (Command Query Responsibility Segregation) separates write model (commands, normalized, strict) from read model (queries, denormalized, fast).

    7. 49
      Event Sourcing

      Event Sourcing persists state as a sequence of state-changing events — not current row snapshot.

    8. 50
      Saga Pattern

      Saga manages distributed transactions as a sequence of local transactions with compensating actions on failure.

    9. 51
      Outbox Pattern

      Outbox Pattern solves the dual-write problem: atomically persist business data and outgoing message in the same database transaction, then a relay process publishes to Kafka/SNS.

    10. 52
      Circuit Breaker

      Circuit Breaker stops cascading failures when a downstream dependency is unhealthy.

    11. 53
      API Gateway Pattern

      API Gateway is the single entry point for clients into microservices — routing, authentication, rate limiting, TLS termination, and request shaping.

    12. 54
      Backend for Frontend (BFF)

      BFF (Backend for Frontend) provides a dedicated backend per client channel — mobile, web, partner — that aggregates microservices into the exact shape each frontend needs.

    13. 55
      Strangler Fig Pattern

      Strangler Fig gradually replaces a legacy system by intercepting traffic at the edge — new routes go to the new system, unmatched routes fall through to legacy.

    Refactoring & Anti-Patterns

    0/5 complete
    1. 56
      Refactoring to Patterns

      Refactoring to Patterns (Joshua Kerievsky, 2004) inverts the GoF approach.

    2. 57
      When NOT to Use a Pattern

      When NOT to use a pattern is the most under-taught topic in design patterns.

    3. 58
      Pattern Overengineering

      Pattern overengineering is the senior tax on junior enthusiasm: every new wrapped in Factory, every interface with one implementation, 8-layer stacks before CRUD hits the database.

    4. 59
      Testing Pattern-Based Code

      Testing pattern-based code reveals whether patterns helped or hurt.

    5. 60
      Patterns in Legacy Codebases

      Patterns in legacy codebases is where seniors earn their keep: no tests, tangled dependencies, original authors gone, business can't stop shipping.

    Interview Mastery

    0/5 complete
    1. 61
      Design Patterns Interview Strategy

      Design patterns interviews at senior levels test judgment, not memorization.

    2. 62
      System Design + Patterns

      System design + patterns is the layer above GoF: how patterns compose in distributed systems.

    3. 63
      Mock Interview: Creational

      Mock interview: creational simulates a 45-minute senior loop on object-creation patterns.

    4. 64
      Mock Interview: Behavioral

      Mock interview: behavioral focuses on collaboration patterns.

    5. 65
      Pattern Vocabulary Cheat Sheet

      Pattern vocabulary cheat sheet — print, fold, review before senior interviews.

    Real-World Architecture

    0/5 complete
    1. 66
      E-Commerce Checkout Architecture

      E-commerce checkout is the canonical capstone — pricing, inventory, payment, fulfilment, notification, audit.

    2. 67
      Notification System Design

      Notification system design tests Strategy + Factory + Observer + Outbox composition.

    3. 68
      Payment Gateway Integration

      Payment gateway integration is highest-stakes pattern composition: money involved, partial failures unacceptable, vendor SDKs inconsistent, regional providers need fallbacks.

    4. 69
      Multi-Tenant SaaS Patterns

      Multi-tenant SaaS requires tenant-aware routing, auth, data, config, billing, audit.

    5. 70
      Final Capstone Review

      Final capstone review closes the course tying every lesson together.