Software Architecture

Principles and patterns for structuring a codebase and a system as a whole.

Beginner

  1. What is Software Architecture?: The big decisions about how a codebase is organized and how its pieces fit together.
  2. Separation of Concerns: Keep different jobs, like fetching, validating, and displaying data, in separate places instead of tangled together.
  3. Coupling & Cohesion: How much pieces of code depend on each other (coupling) versus how well one piece focuses on one clear job (cohesion).
  4. Layered Architecture: Organize code into layers, like presentation, business logic, and data access, where each layer only talks to the one next to it.

Intermediate

  1. SOLID Principles: Five guidelines, grouped under one acronym, for keeping object-oriented code flexible and easy to change.
  2. Dependency Inversion: Make important code depend on an abstraction (an interface describing what it needs) instead of one concrete implementation.
  3. Clean Architecture / Hexagonal Architecture: Keep business logic independent of frameworks, databases, and UI, so you can swap any of them without touching the core.
  4. Domain-Driven Design (DDD) Basics: Organize code around the real business concepts it models, with entities, value objects, and a vocabulary shared with domain experts, not around technical convenience.
  5. Monorepo vs Polyrepo: Choosing whether to keep multiple projects or packages in one shared repository or in separate ones, and the tradeoffs of each.

Advanced

  1. Event Sourcing & CQRS: Store every change that happened instead of just the current state, and use separate models for writing and reading data.
  2. Architectural Decision Records (ADRs): Write down major architecture decisions and the reasons behind them, so future maintainers know why a choice was made, not just what it was.
  3. Technical Debt: The tradeoff between shipping a faster, less-ideal solution now and the ongoing cost of living with or fixing it later, much like financial debt.
  4. Anti-Corruption Layer: A translation layer that keeps a messy or incompatible external system's quirks out of your clean internal model.