Search
Lessons (40)
- What Are Design Patterns?
Design patterns are named, reusable solutions to problems that keep coming up in software design. Meet the three …
- Which Pattern Do I Need?
A problem-first guide for picking the right design pattern, telling look-alike patterns apart, and spotting when …
- Architecture Patterns at Scale
… central services, independently deployed services, event functions and decentralized peers](/img/system-design-l6/architecture-patterns.svg) Style …
- DSA Interview Patterns Cheat Sheet
… Interviews test whether you can recognise the pattern from the wording, then apply its template. Pick a technique …
- Creational Patterns: How to Make Objects
… Creational patterns hide the "how" of creating objects , so the rest of the code only asks for what …
- Behavioral Patterns I: Observer, Strategy, Command, State
The four behavioral patterns you'll use most, explained with everyday analogies, diagrams and practical JavaScript. Why behavioral …
- Data in Microservices: Sagas & the Outbox Pattern
… So microservices accept eventual consistency and use sagas. The saga pattern A saga is a series of local …
- Structural Patterns: How to Connect Objects
… How to plug incompatible pieces together and build big structures from small ones. Why structural patterns? Structural patterns …
- Behavioral Patterns II: Chain, Template, Iterator, Mediator, Memento, Visitor
Six more behavioral patterns, from Express-style middleware chains to undo snapshots, each with a picture and a …
- Resilience Patterns
… The patterns below stop that.  1. Timeouts: never wait forever …
- Domain-Driven Design: Tactical Patterns
… small, immutable, self-validating ⭐ Value objects are the easiest tactical pattern to adopt, and remove a huge class …
- Hash Maps & Sets
… Learn how hashing gives O(1) lookups, how collisions are handled, and the patterns (counting, seen-set, grouping …
- Real-Time, Pub/Sub, Webhooks and CDC
Choose the right push or event mechanism and keep event delivery observable, idempotent and replayable. ![Event patterns: an …
- Event-Driven Architecture
… Broker vs mediator topologies, the four kinds of event patterns, event design, and the real trade-offs. The …
- Indexes, EXPLAIN & Query Plans
Design indexes from real filter, join and sort patterns, then prove improvements with query plans and production-like …
- MVC, MVP & MVVM
Three patterns for separating what the user sees from the data and logic behind it. How each works …
- Database Internals, Replication and Scaling
… Choose database types by access pattern: relational, document, key-value, wide-column, graph, time-series, search and vector …
- DRY: Don't Repeat Yourself
… email.js const EMAIL PATTERN = /^[^@\s]+@[^@\s]+\.[^@\s]+$/; export const isValidEmail = (email) = EMAIL PATTERN.test(email); // everywhere else …
- Heaps & Priority Queues
… For objects: (a, b) = a.priority - b.priority . Pattern: Top K ⭐ "Find the k largest numbers in a …
- What Is Software Architecture?
… High Design How is one part organised? Classes, patterns (Strategy, Repository), module APIs 🟡 Medium Code How is …
- CQRS & Event Sourcing
… Powerful patterns, explained simply, with honest trade-offs. Part 1: CQRS The big idea A restaurant kitchen and …
- Scaling, Load Balancing & Rate Limiting
… Design for it: Pattern Purpose --- --- Timeouts Never wait forever on a dependency Retries with exponential backoff + jitter Survive …
- Domain-Driven Design: Strategic Design
… Domains and subdomains, ubiquitous language, bounded contexts, all the context-mapping patterns, and event storming to discover them …
- KISS: Keep It Simple, Stupid
… welcomeTemplate(user) }); } When you have five notification channels, a strategy pattern may earn its place. With one, it …
- React vs Vue vs Angular
… Simple mental model; sometimes needs memoisation. - Vue wraps state in Proxies (remember the Proxy pattern?) and tracks exactly …
- Pods
… network, provided by the CNI plugin). Multi-container patterns Sidecar A helper container that extends the main one …
- State Management (Redux, Zustand, TanStack Query)
… Redux Toolkit (structured) Redux is the classic, predictable pattern: one store , state changed only by dispatching actions handled …
- Service Communication: Sync vs Async
… All covered in Resilience Patterns . Avoid chatty services mermaid flowchart LR subgraph Chatty["❌ Chatty: N+1 over the …
- Kafka vs RabbitMQ & the Kafka Ecosystem
… the easiest way to implement the outbox pattern or to stream database changes to search indexes and warehouses …
- Delivery Guarantees: At-Most, At-Least & Exactly Once
… data). Choosing a guarantee Guarantee Producer config Consumer pattern Use for --- --- --- --- At-most-once acks=0 or 1 …
- SQL vs NoSQL Databases
… Queries are varied and change over time Access patterns are known and simple Data integrity matters most Schema …
- Kafka Producers
… close the producer on shutdown - [ ] Use the outbox pattern when writing to a database and Kafka together (see …
- Microkernel (Plugin) Architecture
… plugins: [react()] Convention Load everything matching a naming pattern or folder eslint-plugin- , a plugins/ folder Manifest + marketplace …
- Serverless Architecture
… Functions as a Service, event triggers, cold starts, pay-per-use pricing, managed backends, and the patterns and …
- Authentication, Authorization & API Security
… Traditional web apps APIs, mobile apps, microservices Common pattern: a short-lived access token (15 min) plus a …
- Finding Service Boundaries with DDD
… For the full picture, see [DDD strategic design](/learn/software-architecture/ddd-strategic-design) and [DDD tactical patterns …
- Frontend Security
… session=abc123; HttpOnly; Secure; SameSite=Lax; Path=/; Max-Age=86400 💡 A popular pattern is the BFF (Backend for …
- Database Indexing & Transactions
… for that, see Sagas & the Outbox Pattern in the Microservices lessons. Key takeaways - Indexes turn O(n) scans …
- Normalization & Denormalization
… I use BCNF for exceptional dependency patterns where a non-key determinant still creates redundancy. I denormalize only …
- Choosing an Architecture
… else" Old["🏚️ Legacy system"] The strangler fig pattern: new features and migrated routes go to the new …