iwantcoding.com
🔥 Daily 👥 Rooms 🏆 Top Log in Sign up
« Previous

Patterns HOME

Welcome to the iwantcoding.com Design Patterns Tutorial. Design patterns are battle-tested templates for common design problems. They give you a shared vocabulary and a sensible starting shape — without forcing you into ceremony.

What this tutorial covers

ChapterYou will learn
FoundationsSOLID, DRY / KISS / YAGNI, classes vs composition.
CreationalSingleton, Factory Method, Abstract Factory, Builder, Prototype.
StructuralAdapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy.
BehaviouralChain of Responsibility, Command, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor.
Modern PatternsDependency Injection, Repository, MVC / MVVM, Event Bus, Pub/Sub, CQRS, Event Sourcing, Saga.
ExamplesCheatsheet, runnable snippets, quiz, exercises, bootcamp, certificate.

Who this is for

  • Mid-level devs growing into architecture.
  • Tech leads naming designs out loud.
  • Anyone interviewing for senior roles.
How to use this tutorial: read the chapter, run the example with Try it Yourself », do the exercise, then take the quiz at the bottom. Hit Mark complete when you're done — the sidebar will track your progress.

Example

Example
// Strategy in 6 lines
const strategies = {
    bubble: arr => bubbleSort(arr),
    quick:  arr => quickSort(arr),
};
function sortWith(name, arr) { return strategies[name](arr); }
Try it Yourself »

Discussion

Loading…

« Previous