Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Design Patterns & Architecture Study

Original study notes, runnable examples, and architecture tutorials.

Inspiration: refactoring.guru catalog and GeeksforGeeks catalog (coverage only — all prose, diagrams, and code here are original). See CONTRIBUTING.

Single source of truth: all study content lives under content/ — see content/MAPPING.md for the symlink map (patterns/, architecture/, principles/, practice/ at root and under docs/ are views onto content/).

1. Design Patterns

Per-pattern study pages grouped by category, plus a unified selection guide.

2. Architecture (Application / System)

Two tracks: how code is structured inside one project vs how services communicate at scale. Overview and decision guidance: architecture tutorial and selection guide §2.

3. Principles

Study catalog of 110 principles across 11 categories — see principles index and selection guide §3.

4. Practice

Capstone exercises combining patterns and architecture — see practice index.

5. Guides

  • Selection guide — patterns, architecture, and principles in one place (problem → 2–3 candidates + confused-pair tables)
  • Contributing — originality rules and page templates
  • GitHub Pages — local preview and deploy

Suggested study order

  1. Strategy, Observer, Factory Method — core vocabulary.
  2. Decorator, Adapter, Facade, Command, State.
  3. Builder, Abstract Factory, Composite, Iterator, Template Method.
  4. Layered, Monolithic — the baseline everything else reacts to.
  5. Vertical Slice, Modular Monolith — first escapes from pure layering.
  6. Hexagonal, Onion, Clean — ports, rings, and dependency rules as a group.
  7. Singleton, Bridge, Proxy, Chain of Responsibility, Mediator.
  8. Microservices, Event-Driven — distribution and async as a group.
  9. Prototype, Flyweight, Memento, Interpreter, Visitor.
  10. SOA, Serverless, CQRS & Event Sourcing — enterprise, functions, and data separation last.

Running examples

./run.sh elixir strategy          # or dart / go / rust
./run.sh all                      # run all 92 examples
make run LANG=elixir PATTERN=strategy
make run-all
  • Elixir: cd examples/elixir/strategy && elixir main.exs
  • Dart: cd examples/dart/strategy && dart main.dart
  • Go: cd examples/go/strategy && go run main.go
  • Rust: cd examples/rust/strategy && cargo run --quiet

Each pattern folder has the same scenario in all four languages.