Software Architecture
Principles and patterns for structuring a codebase and a system as a whole.
Beginner
- What is Software Architecture?: The big decisions about how a codebase is organized and how its pieces fit together.
- Separation of Concerns: Keep different jobs, like fetching, validating, and displaying data, in separate places instead of tangled together.
- Coupling & Cohesion: How much pieces of code depend on each other (coupling) versus how well one piece focuses on one clear job (cohesion).
- 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
- SOLID Principles: Five guidelines, grouped under one acronym, for keeping object-oriented code flexible and easy to change.
- Dependency Inversion: Make important code depend on an abstraction (an interface describing what it needs) instead of one concrete implementation.
- Clean Architecture / Hexagonal Architecture: Keep business logic independent of frameworks, databases, and UI, so you can swap any of them without touching the core.
- 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.
- 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
- Event Sourcing & CQRS: Store every change that happened instead of just the current state, and use separate models for writing and reading data.
- 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.
- 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.
- Anti-Corruption Layer: A translation layer that keeps a messy or incompatible external system's quirks out of your clean internal model.