Software Engineering Architecture Lab

Software Architecture Learning Path: 11 Levels

The software architecture learning path in 11 levels and 98 lessons: clean code, OO design, design patterns, DDD, data systems, microservices and production.

Level 1: Engineering Foundations

Make changes cheap: spot duplicated knowledge, hidden coupling and irreversible decisions early.

  1. Meet ShopFlow: The System You Will Architect — One small Spring Boot app, five years of growth, and the questions architects ask at every step.
  2. DRY Is About Knowledge, Not Code — The same business rule in three places is a bug waiting to happen — but similar-looking code is not always duplication.
  3. Orthogonality: Change One Thing, Break One Thing — Coupling, cohesion and designing parts that can change independently.
  4. Contracts, Assertions & Crashing Early — Defensive programming done right: fail loudly at the boundary instead of corrupting data quietly.
  5. Tracer Bullets & Prototypes — Build a thin end-to-end slice first, and throw prototypes away on purpose.
  6. Reversibility: Don’t Bet the Company on One Decision — Keep expensive decisions reversible with seams, abstractions and configuration.
  7. Debugging Like an Engineer — Reproduce, isolate, hypothesise, verify — a repeatable method instead of guessing.
  8. Automate Everything: Version Control, Builds & Pipelines — If you do it twice by hand, the third time it will go wrong.

Level 2: Clean Code & Professional Engineering

Write code others can safely change, and behave like a professional under pressure.

  1. Names and Functions That Explain Themselves — Good names and small functions turn code into documentation that cannot go stale.
  2. Separation of Concerns: Untangling the God Service — Split the 2,000-line OrderService by responsibility, one safe step at a time.
  3. Tests That Let You Change Code Without Fear — Unit, integration and end-to-end tests — what each buys you and what each costs.
  4. Test-Driven Development in Practice — Red, green, refactor on a real ShopFlow discount rule.
  5. Refactoring in Small, Safe Steps — Change structure without changing behaviour, protected by tests.
  6. Technical Debt: The Loan You Didn’t Know You Took — Deliberate vs accidental debt, interest payments, and how to pay it down.
  7. The Professional Engineer: Estimates, Deadlines & Saying No — Honest estimates, clear commitments and staying clean under pressure.

Level 3: Object-Oriented Design

Design classes and interfaces so new requirements mean adding code, not editing fragile code.

  1. Single Responsibility: One Reason to Change — A class should answer to one group of people with one kind of change.
  2. Open/Closed: Add Features Without Editing Old Code — Extend behaviour through new classes instead of growing if/else chains.
  3. Liskov Substitution: Subtypes That Keep Their Promises — When a subclass surprises its callers, inheritance becomes a trap.
  4. Interface Segregation & Dependency Inversion — Small interfaces owned by the caller, and business logic that does not depend on infrastructure.
  5. Composition Over Inheritance — Assemble behaviour from parts instead of building deep class trees.
  6. Encapsulation, Tell Don’t Ask & the Law of Demeter — Put behaviour next to the data it protects, and stop reaching through objects.

Level 4: Design Patterns

Recognise the recurring pain behind a design, and reach for the pattern that relieves it — or decide you do not need one.

  1. Patterns Are Answers to Recurring Pain — How to read a pattern: problem, forces, solution, consequences.
  2. Strategy: Pluggable Payment Methods — Replace a growing if/else over payment types with interchangeable processors.
  3. Factory Method & Abstract Factory: Creating the Right Thing — Centralise the decision of which implementation to create.
  4. Builder, and Why Singleton Is Usually a Trap — Readable construction of complex objects — and global state disguised as a pattern.
  5. Adapter: Taming Third-Party Payment Gateways — Make Stripe-like and Razorpay-like SDKs look like your own interface.
  6. Decorator: Adding Behaviour Without Touching the Core — Wrap a processor with logging, retries, metrics and fraud checks.
  7. Facade & Proxy: Simple Front Doors and Smart Stand-ins — Hide subsystem complexity; control access with caching, lazy loading and security proxies.
  8. Observer: Reacting to Order Events — Let email, analytics and loyalty react to “order placed” without the order knowing them.
  9. Command: Refunds, Retries and Queued Work as Objects — Turn requests into objects you can queue, log, retry and undo.
  10. State: An Order Lifecycle Without the Giant Switch — Model PLACED → PAID → SHIPPED → DELIVERED with objects that know their own transitions.
  11. Template Method: One Checkout Skeleton, Many Variations — Fix the algorithm’s steps, let subclasses fill the variable parts.
  12. Chain of Responsibility: Validation & Fraud Pipelines — Pass a request through a line of independent handlers.
  13. Composite, Bridge, Mediator, Iterator & Prototype — The less common patterns — recognise them when you meet them.

Level 5: Enterprise Application Architecture

Structure a business application into layers, choose how domain logic and data access are organised, and understand what your framework does for you.

  1. Layered Architecture: Presentation, Domain, Data — Why separating layers helps — and how layers become a lasagne of pass-through code.
  2. Transaction Script vs Domain Model vs Table Module — Three ways to organise business logic, chosen by how complex the logic is.
  3. Service Layer: One Front Door for Every Use Case — Define application boundaries, transactions and orchestration in one place.
  4. Active Record vs Data Mapper (and the Gateways) — Should objects save themselves, or should a mapper keep them ignorant of the database?
  5. Repository: A Collection-Like Home for Aggregates — Let the domain ask for objects without knowing about SQL.
  6. Unit of Work, Identity Map & Lazy Load — What JPA/Hibernate does for you — and how it surprises you (N+1, dirty checking).
  7. MVC, Front Controller & Friends — How Spring MVC’s DispatcherServlet embodies decades-old presentation patterns.
  8. Remote Facade & DTO: Designing Across the Network — Coarse-grained APIs and data transfer objects for expensive remote calls.
  9. Optimistic vs Pessimistic Offline Locks — Protect business transactions that span several requests.
  10. Enterprise Integration Patterns: Messaging Between Systems — Channels, routers, translators, dead letters and idempotent receivers.

Level 6: Domain-Driven Design

Model a complex business domain in code, and draw boundaries where the language changes.

  1. Ubiquitous Language: Code That Speaks the Business — One shared vocabulary between experts and code, per boundary.
  2. Entities vs Value Objects — Identity vs value: why Address and Money should not have ids.
  3. Aggregates: Consistency Boundaries That Protect Invariants — Group objects that must change together, and guard them behind one root.
  4. Domain Services vs Application Services — Where logic goes when it does not belong to a single entity.
  5. Domain Events: Things That Happened — Model important facts explicitly and let other parts react.
  6. Bounded Contexts: Where Words Keep One Meaning — A boundary around a part of the business where the same words mean the same thing.
  7. Context Maps: How Bounded Contexts Relate — Anti-corruption layers, shared kernels, customer/supplier, open host and more.
  8. Strategic Design: Core, Supporting & Generic Subdomains — Invest where you compete; buy or simplify the rest.

Level 7: Software Architecture

Identify the characteristics that matter, compare styles by their trade-offs, and record decisions so others understand why.

  1. What Architecture Really Is (and Isn’t) — Structure, characteristics, decisions and principles — and why “it depends” is the honest answer.
  2. Architecture Characteristics: The -ilities Under Pressure — Availability, scalability, performance, deployability… identified from real business scenarios.
  3. Architecture Styles and Their Trade-offs — Layered, modular monolith, microkernel, event-driven, space-based and microservices compared.
  4. The Modular Monolith — Strong module boundaries in one deployable — the most underrated architecture.
  5. Coupling, Connascence & Architecture Quanta — Measure how parts depend on each other, statically and at runtime.
  6. Architecture Decision Records — Write down context, decision and consequences so the “why” survives.
  7. Trade-off Analysis: Thinking Like an Architect — A repeatable way to compare options when there is no right answer.

Level 8: Data-Intensive Systems

Explain how databases store, replicate, partition and protect data — and predict how they fail.

  1. Storage Engines: B-Trees vs LSM-Trees — Pages and in-place updates vs append-only logs, SSTables and compaction.
  2. Indexes: Fast Reads, Slower Writes — How an index turns a full scan into a lookup, and what every index costs.
  3. Caching: Speed at the Cost of Truth — Cache-aside, write-through, TTLs, invalidation and stampedes.
  4. Replication: Leaders, Followers & Failover — Synchronous vs asynchronous copies, and what happens when the leader dies.
  5. Replication Lag: When Your Own Write Disappears — Read-your-writes, monotonic reads and consistent prefix reads.
  6. Partitioning: Hash, Range, Hotspots & Rebalancing — Split data across machines without creating hot partitions.
  7. Transactions & What ACID Actually Promises — Atomicity, consistency, isolation, durability — precisely, and without marketing.
  8. Isolation Levels: Dirty Reads to Serializable — Anomalies, MVCC, locks, and why “read committed” is not enough for money.
  9. Lost Updates: Optimistic vs Pessimistic Locking — Two admins edit the same product; one change silently vanishes.
  10. The Trouble With Distributed Systems — Unreliable networks, unreliable clocks and partial failure.
  11. Consistency Models, CAP & Consensus — Linearizability, eventual consistency and an honest reading of CAP.
  12. Logs & Kafka: Partitions, Offsets and Ordering — An append-only log as the backbone of data flow.
  13. Consumer Groups & Delivery Semantics — Scaling consumers, rebalancing, and at-least-once vs “exactly-once”.
  14. Batch vs Stream Processing & Data Pipelines — Derived data, reprocessing, and moving data between systems.
  15. Event Sourcing & CQRS — Store what happened; build read models for how you want to query it.

Level 9: Microservices

Decide whether microservices are worth it, draw service boundaries, and design communication and failure handling that survive production.

  1. Why Microservices Exist — and When Not to Use Them — Independent deployability is the point; complexity is the price.
  2. Finding Service Boundaries & Splitting the Monolith — Information hiding, bounded contexts and the strangler fig.
  3. Database per Service & Data Ownership — Why sharing a database couples services, and how to live without joins.
  4. Synchronous vs Asynchronous Communication — REST, gRPC and events — temporal coupling and its consequences.
  5. API Gateways, BFFs & Service Discovery — How clients find services, and what belongs at the edge.
  6. Timeouts, Retries & Retry Storms — Why naive retries turn a slow service into an outage.
  7. Circuit Breakers & Bulkheads — Fail fast, isolate damage, and recover gracefully.
  8. Idempotency: Making Retries Safe — Idempotency keys, deduplication and the myth of exactly-once.
  9. Distributed Transactions: 2PC, Sagas & the Outbox — Keep data consistent across services without a global transaction.
  10. Observability: Logs, Metrics, Traces & SLOs — Answer “why is checkout slow?” across ten services.
  11. Deployment: Containers, Kubernetes, Canary & Feature Flags — Ship small, ship often, and limit the blast radius.
  12. Testing Microservices & Consumer-Driven Contracts — Catch breaking API changes without a giant end-to-end suite.
  13. Teams, Ownership & Conway’s Law — Architecture and org charts shape each other.

Level 10: Architecture That Survives Change

Protect architecture characteristics automatically and evolve the system incrementally instead of by big rewrites.

  1. Architecture Erosion: How Good Designs Decay — Small shortcuts, repeated for a year, become the architecture.
  2. Fitness Functions: Tests for Your Architecture — Turn architecture goals into objective, automated checks.
  3. Automated Architecture Tests with ArchUnit — Fail the build when a module breaks a dependency rule.
  4. Incremental Change: Strangler Fig, Expand/Contract & Pipelines — Evolve a running system without big-bang rewrites.
  5. Evolving Data: Schema Changes Without Downtime — Parallel change, backfills and versioned events.
  6. Change Dimensions & the Last Responsible Moment — Decide late enough to know more, early enough to act.

Level 11: Production Architecture

Design, operate and reason about a system at global scale — and put every previous level together.

  1. Load Balancing & Horizontal Scaling — Spread traffic across instances and scale without sticky surprises.
  2. Reliability: SLOs, Error Budgets & Graceful Degradation — Decide how reliable is reliable enough, then engineer for it.
  3. Security Architecture for Backend Engineers — Authentication, authorisation, zero trust, secrets and threat modelling.
  4. Going Global: Multi-Region & Disaster Recovery — Active-passive vs active-active, RPO/RTO and data residency.
  5. ShopFlow 2030: The Whole Picture — Every decision from monolith to multi-region, and the trade-offs behind each one.