Ch. 2 — Software Architecture Fundamentals
---title: "Ch. 2 — Software Architecture Fundamentals"clipping: "[[Clippings/software-architecture-fundamentals/02-software-architecture-fundamentals.pdf]]"status: studieddate_started: 2026-07-08date_studied: 2026-07-20tags: [software-architecture, isaqb, cpsa-f]---
Summary
## Summary
The terminology backbone of the CPSA-F curriculum (iSAQB learning goals
LG 1-1 … 1-10). Defines software-intensive systems, argues that every system
inherently has an architecture ("a framework for change"), builds the core
vocabulary — building blocks, interfaces, views, architectural levels — and
closes with a bird's-eye view of the design process (Twin Peaks) and the
architect's role.
##
Key points
###
Why every system has an architecture
-
- The magic
rectangle**rectangle: functionality, quality, effort, time — the fouraxes every project is judged on. Requirements engineering and architecturedesign are the highest-leverage disciplines because both force far-reachingdecisions at the moment of least knowledge.- - Software-intensive
system**system: a system whose essential tasks are carriedout by software building blocks. Three categories, each with a typicalinstinct:*informationsystems*systems (data-heavy, many users → layeredarchitectures, data/transaction problems),*embeddedsystems*systems (physical,resource-constrained, safety-critical → loosely coupled processes overbuses, scheduling/comms problems),*mobilesystems*systems (autonomous, personal,intermittently connected → shared-memory processes, UI-vs-hardwaretension). Real systems blur categories, but each points to a toolbox.- - Every system has an
architecture**architecture — inherent, not optional; the onlychoice is explicit design vs. accident. Rausch:*"Software architecture isa framework for change."*Load-bearing wall analogy: architecture decideswhich parts are load-bearing (expensive to change) and which aredecorative (cheap to change) — and that split is**relative to whichfuture changes actuallyhappen**happen, not a fixed property of the code.- - Definition (ISO/IEC/IEEE 42010:2011)
**: "fundamental concepts orproperties of a system in its environment embodied in its elements,relationships, and in the principles of its design and evolution."Architecture objectives are**long-term**term, often amortizing only after theproject ends — unlike short-term project objectives (LG 1-7). Implicitassumptions and constraints must be made explicit (LG 1-8).
###
Building blocks & interfaces
-
- Building
block**block (deliberately not "component"): any abstraction ofcode, from function to subsystem. Three defining characteristics:
- Provided and required
interfaces*interfaces — provided interfaces are acontract to the outside world, but only honored when the block's ownrequired interfaces are satisfied. - Encapsulation and
interchangeability*interchangeability — implementation is hiddenbehind interfaces; anything offering the same provided/requiredinterfaces should be swappable without callers noticing. - Configuration and hierarchical (de)
composition*composition — a building blockcan itself be a configuration of smaller building blocks wiredtogether.-
1. *2. *3. ***Interface** - Provided and required
- Interface: a well-defined access point (syntax, behavior, errors,
non-functional characteristics, protocols, semantics…). Interfaces can
**never be fullyspecified**specified — Java's`Collection`Collectiondocuments everythingexcept insert performance, which is exactly what decides`ArrayList`ArrayListvs
`LinkedList`LinkedList. The architect decides which unstated aspects matter enoughto pin down.- - View
depth**depth: black box (provided/required interfaces only — caller'sview), gray box (+ technical/runtime interfaces), white box (internalconfiguration — implementer's view).- - Who defines an
interface**interface: standard (third party) / provided(exporter — most common) / required (importer — plugin style) /independent (neither side owns it + an adapter connects them).Independent maximizes decoupling but costs effort; if an adapter is usedas a shortcut without ever generalizing the interface, "temporary"quietly becomes permanent.
###
Describing architecture: views & levels
-
- IEEE 42010 description
model**model: stakeholders → concerns → viewpoints(conventions) → views, plus documented**rationale**rationale. Views are
**projections**projections — the same 3D object casts a circle from below and atriangle from the side; neither view is wrong or complete on its own.- - Four architectural levels, two
dimensions**dimensions (abstraction × perspective):architectural style (high/functional, e.g. "3-layer web + MVC"),technical infrastructure (high/technical, e.g. "thin client + appcontainer + relational DB"), functional**A-architecture**architecture (domainbuilding blocks), technical**T-architecture**architecture (cross-cutting concerns:persistence, transactions, logging). Siedersleben:**"A and T are bloodgroups — don't mix them."**- - Environment: four surrounding areas, each a two-way street — project
management, product management/requirements engineering, executionplatform/operations (the most neglected interface), tools/devenvironment.- - Quality of an
architecture**architecture is relative to objectives and lifecycle —good architecture keeps the magic rectangle achievable. ISO 25010 gives aquality-attribute checklist to start from.
###
Design process & the architect's role
-
- Twin Peaks
model**model: requirements and architecture descend in paralleliterative spirals — effort estimates only become real once a draftarchitecture exists. Four equally weighted,**non-sequential**sequential activities:analyze requirements/constraints; design views and technical concepts;evaluate architecture and decisions; support/review implementation.- - The architect is both a communication platform and the owner of the
design/implementation blueprint, interfacing with nearly every otherrole on the project.
##
One example, all the vocabulary — `DocumentStore`DocumentStore
One running scenario to hold the terms together, built from the two real
incidents discussed below: a `DocumentStore`DocumentStore building block that saves
files to a cloud provider.
|
| Concept | In DocumentStore |
|---|---|
| Building block | DocumentStore itself — an abstraction from "save a file" down to whatever actually implements it |
| Provided interface | save(file) -> , fetch(id) -> — the promise made to every caller |
| Required interface | A CloudClient (network + auth) — the promise only holds if this dependency is satisfied |
| Encapsulation & interchangeability | Swap GoogleDriveClient for OneDriveClient behind the same DocumentStore interface; callers shouldn't notice |
| Configuration & decomposition | DocumentStore = RetryPolicy + Cache + a CloudClient adapter, wired together internally |
Interface incompleteness (the Collection lesson) |
save() doesn't document max file size or latency — same kind of gap as Collection omitting insert performance; someone still has to decide if the gap matters |
| Interface definer type | Independent interface + adapter: DocumentStore belongs to neither Google nor Microsoft; GoogleDriveAdapter / OneDriveAdapter implement it |
| Black / gray / white box | Caller sees black box (save, fetch); ops sees gray box (retry/timeout config); adapter author sees white box (raw Drive API calls) |
| A/T blood groups | DocumentStore and its adapters are pure T-architecture; the mistake would be naming it ClaimAttachmentStore and hardcoding claim logic inside — A leaking into T |
| The bug actually |
No independent interface existed — code called SaveToGoogleDrive() directly, a |
**The one habit that would have prevented both real incidents below**below: name
interfaces after what they *promise*promise (the capability), never after who
currently *provides*provides them or which domain concept happens to *call*call them.
##
Discussion notes
Three probes, all resolved with real examples from Mehdi's own work:
1.
- Load-bearing walls / framework for change.
**Worked through a 40-pagestatic HTML site: nav duplication and content-in-markup are decorativeunder "keep the site current," but become load-bearing the moment arequirement like i18n arrives — because now every hardcoded string issomething a translation process must touch. Mehdi's own framing:*"thewhole HTML content became a load bearing [wall] that was not before."*Fix while cheap = separate content from structure (externalize strings)before the requirement lands, not after.2. - A/T mixing, case 1 — ORM naming.
**Mehdi had custom ORM functionsnamed after domain concepts (`claim(),``filing(),``process()) instead`of technical ones. Domain vocabulary had leaked into the T-architecture's
*provided interfacenames*names, so a later business-vocabulary change forceda rename across every consuming service — a technical migration thatshould have been invisible to callers instead broke all of them. Fixedby renaming the technical side back to technical terms; the renameitself was costly precisely because the interface names had become a defacto contract.3. - A/T mixing, case 2 —
`SaveToGoogleDrive().`**A different but relatedfailure: the interface was named after a*required*required dependency (GoogleDrive) rather than the*capability*capability it provides. No adapter layerexisted, so when the provider needed to change to OneDrive, the fix washunting down and manually verifying every call site — the cost anindependent-interface-plus-adapter design would have avoided byconfining the change to one new adapter.
**Cross-link**link: LG 1-8 (implicit assumptions → explicit statements) is the
same phenomenon as the METR paper's "AI lacks tacit repo context"
([[digests/metr-early-2025-ai-developer-productivity-rct]]rct) — knowledge
that lives only in maintainers' heads, or in a function name nobody
questioned, is invisible to any newcomer, human or AI.
##
Concepts
- concepts/software-
architecture]]architecture — architecture as inherent, frameworkfor change, load-bearing walls relative to anticipated change- - concepts/building-blocks-and-
interfaces]]interfaces — the three characteristics,interface completeness, interface definer types, the`DocumentStore`DocumentStoreexample- - concepts/architectural-views-and-
levels]]levels — IEEE 42010 descriptionmodel, four levels, A/T blood groups- - concepts/twin-peaks-
model]]model — requirements/architecture co-evolution,four non-sequential design activities (light for now — grows with ch. 3)
##
Open questions
-
- "Test your knowledge" section (LG 1-1 … 1-10) not yet used — good
material for a future review session.- - How do the four architectural levels map onto the Twin Peaks design
activities? Revisit in ch. 3 (Designing Software Architectures).- - When is it worth paying for an independent interface + adapter
*upfront*upfront versus accepting the risk and refactoring later? (effort vs. risktradeoff — ties into Twin Peaks' point that estimates only firm up once adraft architecture exists)