Documenting Software Architecture
TL;DR
What & How: practical, pragmatic approach to documenting architecture.
-
Intro & Goals
- motivation/business problems solved, e.g. tabulated use cases
- 3~5 “quality goals” e.g. reliability/security/maintainability/performance/compatibility
- stakeholders (target audience/users)
- Constraints: inappropriate use cases, e.g. “unsupported on Windows”
- Context & Scope diagram
- Solution Strategy: tech stack, design pattern
-
Code (architecture “building blocks”) Diagrams
- whitebox: overall API
- blackboxes: subcomponents
- Runtime Diagram: list of steps, flowchart, sequence diagram
-
Deployment Diagram
- hardware/infrastructure requirements
- mapping of software building blocks to said hardware
-
Pervading Ethos: design patterns,
UX
user experience
choices, approach to security, “under-the-hood” concepts -
Architecture Decisions: rationale for not doing things differently, e.g.
ADR
architecture decision record
(worth its own TL;DR too long; didn’t read
)-
(personal opinion) ADR seems an
XY problem
attempted solution (Y) misses the original problem (X)
. The motivation for ADR (i.e. not just knowing the decision – reading source code – but remembering motivation behind it) can be easily be addressed by inline code comments with URLs (e.g. linking to a GitHub comment) and/or commit messages. The only real value of ADR is collating such comments.
-
(personal opinion) ADR seems an
XY problem
attempted solution (Y) misses the original problem (X)
-
Detailed Quality Goals
- more detailed than (1.2) above, e.g. ATAM “quality attribute utility tree”
- usage scenarios, e.g. “processes user input within 1 second” (not to be confused with use cases)
- Risks & Tech Debt: current issues & tips to manage/reduce/avoid them
- Glossary: domain/technical terms; avoid synonyms & homonyms to maximise identical understanding