The Nine Layers of LVD, Explained
A plain-English tour of LVD's nine layers, from Schema to UI: what each one holds, why it sits where it does, and the rule that connects them.
Volatility ν = 0.6 · Chapter 6
Everything that touches the outside world: databases, third-party APIs and legacy systems, wrapped in repositories, adapters and facades, with resilience and caching built in.
A plain-English tour of LVD's nine layers, from Schema to UI: what each one holds, why it sits where it does, and the rule that connects them.
Repository, Adapter, Facade and Anti-Corruption Layer are four ways the Resources layer translates between outside systems and your domain model.
A retry loop can prolong an outage it was meant to ride out. Here is a capped, jittered backoff you can prove correct, and the layers LVD gives each part.
Caching and error translation both hide something from callers: where data came from and how a vendor fails. See how the Resources layer handles each.
Resources code talks to slow, stateful systems. Mocks, containers and contract tests each answer a different question about it, and 80% coverage is the target.
Where to put the vendor-neutral contract so that a hospital switching EHR systems becomes a contained change in the Resources layer.
How the book's ShopFlow example spreads a retail platform across nine layers, and how three teams split the work along those layers.
How to test Schema, Utils, Resources and Tools in LVD: exhaustive rule checks, property-based tests, containers for adapters and mocks at the resource boundary.
The whole idea of Layered Volatility Decomposition in one sitting: sort code by how often it changes, depend only downward, and let nine layers do the rest.
A one-page reference to LVD's nine layers: volatility coefficients, what lives in each, what does not, plus the dependency rule and axioms A5 and A6.