Dedication
Prelude — Uneducation, diskarte, and patterns
Prologue — Why I wrote this book
- How I found MVC and DCI
- What this book covers
- How to use this book
Part I — History
Chapter 1 — Smalltalk, PARC, and Thing–Model–View–Editor → MVC
- Roadmap
- 1. Design before code
- 2. Smalltalk, PARC, and MVC (1978–79)
- 3. What MVC leaves open
- Takeaways
Chapter 2 — Roles before DCI: OOram, then Data–Context–Interaction
- Roadmap
- 1. OOram: roles after MVC
- 2. DCI: Data, Context, Interaction
- 3. Coplien’s bridges—and the Rails path
- Takeaways
Part II — Foundations
Chapter 3 — Mental models: what the system is vs what it does
- Roadmap
- 1. Class-oriented vs object-oriented
- 2. Dual mental models
- 3. Runnable contrast
- Takeaways
Chapter 4 — Basic collaboration patterns that matter
- Roadmap
- 1. Four patterns that foreshadow roles
- 2. Composition over inheritance
- 3. The honest limit
- Takeaways
Chapter 5 — Use cases, algorithms, and roles
- Roadmap
- 1. Theatre and cue scripts
- 2. Money Transfer as a Context
- 3. UML binders vs readable code
- Takeaways
Part III — The MVC family
Chapter 6 — Original MVC in practice
- Roadmap
- 1. MVC bridges to the user’s data model
- 2. A tiny MVC loop
- 3. What MVC refuses to own
- Takeaways
Chapter 7 — How “MVC” mutated on the web
- Roadmap
- 1. Why the word drifted
- 2. Fat controller, fat model
- 3. Service object → Context
- Takeaways
Chapter 8 — Action–Domain–Responder (ADR)
- Roadmap
- 1. Why ADR
- 2. Transfer in ADR shape
- 3. Rails and the DCI handoff
- Takeaways
Chapter 9 — MVP (Potel / Taligent, 1996)
- Roadmap
- 1. Passive View
- 2. Transfer Presenter (UI only)
- 3. Keep Presenters at the glass
- Takeaways
Chapter 10 — MVVM (Gossman / Microsoft, 2005)
- Roadmap
- 1. ViewModel
- 2. TransferViewModel
- 3. Roles stay out of the VM
- Takeaways
Chapter 11 — Coordinators and MVVM-C
- Roadmap
- 1. Navigation leaves the ViewModel
- 2. Flow vs Interaction
- 3. Checklist
- Takeaways
Chapter 12 — MVI and The Elm Architecture (TEA)
- Roadmap
- 1. One-way UI
- 2. Transfer form as UI state
- 3. Sister pattern, not a rival
- Takeaways
Chapter 13 — VIPER and Clean-inspired mobile splits
- Roadmap
- 1. Five parts
- 2. Transfer in VIPER shape
- 3. Decision notes
- Takeaways
Chapter 14 — Choosing in the MV* family
- Roadmap
- 1. Selection matrix
- 2. One Context, three shells
- 3. Toward Part IV
- Takeaways
Part IV — Complex application architectures
Chapter 15 — Domain-Driven Design
- Roadmap
- 1. What DDD already solves
- 2. Transfer across aggregates
- 3. Language alignment
- Takeaways
Chapter 16 — Hexagonal, Onion, and Clean Architecture
- Roadmap
- 1. Inward dependencies
- 2. Ports deliver players into a Context
- 3. Interactors versus Contexts
- Takeaways
Chapter 17 — CQRS and Event Sourcing
- Roadmap
- 1. Separate write and read
- 2. Context on the command side
- 3. Replay and limits
- Takeaways
Chapter 18 — The actor model
- Roadmap
- 1. Message passing
- 2. In-process actors with a Context
- 3. Systems vs process-local actors
- Takeaways
Chapter 19 — Entity–Component–System
- Roadmap
- 1. Data-oriented loops
- 2. ECS-shaped balances
- 3. When to choose which
- Takeaways
Part V — Exotic and adjacent
Chapter 20 — Naked Objects, PAC, HMVC
- Roadmap
- 1. Naked Objects
- 2. PAC and HMVC
- 3. Auto-UI Account vs Transfer Context
- Takeaways
Chapter 21 — Traits, aspects, subject-oriented, Qi4j
- Roadmap
- 1. Injection embeddings
- 2. Mixin-style Transfer
- 3. Where AOP and Qi4j fit
- Takeaways
Chapter 22 — Steelman the critics: Hickey and data-first design
- Roadmap
- 1. Data-first cousins
- 2. What Hickey actually argues
- 3. Where Hickey and DCI already agree
- 4. Where they part—and a fair comparison
- Takeaways
Part VI — DCI, then agents
Chapter 23 — DCI in depth: Data, Context, Interaction
- Roadmap
- 1. Responsibilities, lifecycle, identity
- 2. Full Money Transfer
- 3. Testing and failure modes
- Takeaways
Chapter 24 — DCI by Example
- Roadmap
- 1. The recipe
- 2. Library loan
- 3. Checkout
- 4. Dijkstra
- What the three examples share
- Takeaways
Chapter 25 — From a fat Rails model to a Context
- Roadmap
- 1. Before
- 2. Pin the behavior
- 3. Move the body, unchanged
- 4. Name the roles
- 5. The controller, and the next rule
- Takeaways
Chapter 26 — Why DCI fits: completing MVC
- Roadmap
- 1. Completing the pair
- 2. Screen gesture → Context
- 3. What DCI is not—and a brownfield path
- Takeaways
Chapter 27 — DCI against the whole map
- Roadmap
- 1. Layer cake
- 2. Decision cookbook
- 3. One-page checklist
- Takeaways
Chapter 28 — DCI and AI agents
- Roadmap
- 1. Where the model sits
- 2. A runnable agent Context
- 3. Contexts as config
- Takeaways
Chapter 29 — Epilogue: habitability
- Roadmap
- 1. Habitability
- 2. Closing—don’t worship the book
Sources and further reading
- Primary
- Also cited