Architecture & design
This folder has no README. Everything inside it is listed below.
Notes
- GRASP — General Responsibility Assignment Software Patterns 7 Nine principles for assigning responsibilities to classes and objects, introduced by Craig Larman in Applying UML and Patterns (1997).
- Feature-based structure 5 Organise code by what it does, not by what kind of thing it is.
- Dependency Injection 4 Dependency injection is a design pattern where a component receives its dependencies from the outside instead of creating or looking them up itself.
- Dependency Inversion 4 Dependency inversion is one of the SOLID principles.
- Why prefer composition over inheritance? 4 Same job done two ways — a service that processes data and reports what it did.
- Layered Architecture 7 The most common application architecture.
- DI containers and the dependency-injector library 7 Dependency injection as a pattern is in 03_dependency_injection.md.
- Monolith vs microservices 5 A monolith is one deployable artifact released as one unit.
- Clean Architecture 7 Robert C. Martin's name for an architecture style that combines and refines Hexagonal (Cockburn, 2005), Onion (Palermo, 2008), and DDD ideas.
- MVC pattern MVC (Model–View–Controller) splits an application into three parts with distinct responsibilities, so presentation, input handling, and business/data logic…
- Hexagonal Architecture (Ports and Adapters) 7 Alistair Cockburn's name (2005) for an architecture that isolates the application core from external concerns through explicit interfaces ("ports") and…
- Domain-Driven Design (DDD) 8 Eric Evans, Domain-Driven Design (2003).
- CQRS and Event Sourcing 8 Two patterns often discussed together. CQRS (Command Query Responsibility Segregation) separates reads from writes.
- Repository and Unit of Work Patterns 8 Two complementary persistence patterns popularized by Martin Fowler's PoEAA (2002).
- Sagas and compensation 7 An order needs a payment charged, stock reserved and a shipment booked, and each lives in a different service with its own database.
- The transactional outbox 7 A service commits an order and publishes OrderPlaced.
- Rate-Limiting Algorithms 7 "Limit requests per user/IP/endpoint" sounds simple.
- Idempotency keys 7 A client sends POST /charges, the response never arrives, and the client retries.
- Event-Driven Architecture 5 A style where components communicate by producing and reacting to events — facts about things that already happened — instead of calling each other directly.
- The twelve-factor app A 2011 Heroku manifesto (12factor.net) on building services that are portable, disposable, and scalable — deployable to any platform without code changes.
- Multi-tenant data isolation 6 One deployment serving many customers. The whole design question is where the boundary between them sits, because that choice sets your blast radius, your…
- Authorization: RBAC, ABAC and where to enforce them 6 Authentication says who you are. Authorization says what you may do, and it is the half that gets designed by accident - a few if user.is_admin checks that…
- Architecture decision records 5 An ADR is a short document recording one decision, its context, and its consequences, committed alongside the code.
- Vertical slice architecture 4 Layered, clean and hexagonal all organise code by kind: every controller together, every service together, every repository together.