How to use this topic

This topic builds on object-oriented concepts and programming paradigms in Programming Concepts, and on the pages about REST APIs in Web & APIs. The first four pages explain what architecture is, the qualities it serves and the principles behind good structure. Pages 5 to 8 cover design patterns and domain-driven design. Pages 9 to 15 compare architecture styles: monoliths and microservices, communication between services, events, contracts, data and the cloud. The last three are about documenting, evolving and repairing an architecture.

The code examples are mostly in Python, with Java, C# or TypeScript where a classic object-oriented language shows a pattern more clearly. Every example with output is a short program that was run, and its exact output is shown.

Pages marked CPSA-F cover learning goals that are examined in the iSAQB Certified Professional for Software Architecture, Foundation Level. The pattern pages and the other pages go beyond what that exam tests and are untagged.

Learning path

  1. 01What Is Software Architecture?What architecture is and how it differs from design: the important decisions that are hard to change, trade-offs, architecture as communication, and what software architects actually do.BeginnerCPSA-F
  2. 02Quality Attributes and Trade-offsThe qualities a system must have beyond its features: performance, scalability, availability, security, maintainability and more, how to make them measurable with scenarios, and why improving one often costs another.BeginnerCPSA-F
  3. 03Design PrinciplesThe principles behind maintainable code: cohesion and coupling, separation of concerns, the SOLID principles, DRY, KISS and YAGNI, and composition over inheritance.BeginnerCPSA-F
  4. 04Layers and BoundariesOrganizing code into parts with clear responsibilities: layered architecture, hexagonal architecture with ports and adapters, clean architecture, and keeping dependencies pointing inward.IntermediateCPSA-F
  5. 05Creational PatternsPatterns for creating objects: factory method, abstract factory, builder and singleton, what problem each solves, and when a plain function is the better choice.Intermediate
  6. 06Structural PatternsPatterns for combining objects: adapter, facade, decorator, proxy and composite, with examples of wrapping legacy systems and adding behavior without changing code.Intermediate
  7. 07Behavioral PatternsPatterns for how objects work together: strategy, observer, command, state, template method and iterator, and how they show up in everyday frameworks.Intermediate
  8. 08Domain-Driven DesignDesigning software around the business domain: ubiquitous language, bounded contexts and context maps, entities, value objects, aggregates and domain events.Intermediate
  9. 09Monolith, Modular Monolith and MicroservicesThe main ways to divide a system into deployable parts, what each costs and gives, when microservices pay off, and why a modular monolith is often the better start.BeginnerCPSA-F
  10. 10Service CommunicationHow services talk to each other: synchronous calls and asynchronous messages, queues and brokers, delivery guarantees, idempotency, timeouts and what happens when a call fails.Intermediate
  11. 11Event-Driven ArchitectureBuilding systems around events: publish and subscribe, event notification and event-carried state transfer, the outbox pattern, eventual consistency and sagas.Intermediate
  12. 12API Design Between ServicesDesigning the contracts between services: API-first, schemas and contracts, versioning, backward and forward compatibility, deprecation, and consumer-driven contract tests.IntermediateCPSA-F
  13. 13Data in Distributed SystemsWhere the data lives when the system is split: database per service, the CAP theorem and PACELC, consistency models, CQRS, event sourcing and keeping data in sync.Advanced
  14. 14Cloud-Native ArchitectureDesigning for the cloud: the twelve-factor app, stateless services, configuration from the environment, disposability, serverless as an architectural style, and managed services as building blocks.Intermediate
  15. 15Scalability and Caching PatternsHandling more load: scaling up and out, stateless services behind a load balancer, cache-aside and other caching strategies, cache invalidation, partitioning and sharding.Intermediate
  16. 16Documenting ArchitectureMaking architecture visible and understandable: the C4 model, architecture decision records, arc42, views for different audiences, and diagrams as code.BeginnerCPSA-F
  17. 17Evolving ArchitectureChanging a system that is already running: technical debt, refactoring, the strangler fig pattern, branch by abstraction, fitness functions and architecture reviews.IntermediateCPSA-F
  18. 18Architecture Anti-PatternsRecognizing what goes wrong: the big ball of mud, the distributed monolith, god objects, the golden hammer, shared databases between services, and how to get out of each.Intermediate

Software Architecture & Design glossary

Short definitions of the terms used in this topic. The full glossary covers every topic.