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
Tiny sketch: data without a use case
Takeaways
Chapter 1 Quiz
3 attempts allowed
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
Chapter 2 Quiz
3 attempts allowed
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
Place-oriented transfer (complected “does”)
Role-shaped sketch (Interaction visible)
Takeaways
Chapter 3 Quiz
3 attempts allowed
Chapter 4 — Basic collaboration patterns that matter
Roadmap
1. Four patterns that foreshadow roles
Strategy — swap a policy
Observer — notify without owning the use case
Command — a step you can hold
Decorator — add behavior without subclassing
2. Composition over inheritance
3. The honest limit
Takeaways
Chapter 4 Quiz
3 attempts allowed
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
Chapter 5 Quiz
3 attempts allowed
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 6 Quiz
3 attempts allowed
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 7 Quiz
3 attempts allowed
Chapter 8 — Action–Domain–Responder (ADR)
Roadmap
1. Why ADR
2. Transfer in ADR shape
3. Rails and the DCI handoff
Takeaways
Chapter 8 Quiz
3 attempts allowed
Chapter 9 — MVP (Potel / Taligent, 1996)
Roadmap
1. Passive View
2. Transfer Presenter (UI only)
3. Keep Presenters at the glass
Takeaways
Chapter 9 Quiz
3 attempts allowed
Chapter 10 — MVVM (Gossman / Microsoft, 2005)
Roadmap
1. ViewModel
2. TransferViewModel
3. Roles stay out of the VM
Takeaways
Chapter 10 Quiz
3 attempts allowed
Chapter 11 — Coordinators and MVVM-C
Roadmap
1. Navigation leaves the ViewModel
2. Flow vs Interaction
3. Checklist
Takeaways
Chapter 11 Quiz
3 attempts allowed
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 12 Quiz
3 attempts allowed
Chapter 13 — VIPER and Clean-inspired mobile splits
Roadmap
1. Five parts
2. Transfer in VIPER shape
3. Decision notes
Takeaways
Chapter 13 Quiz
3 attempts allowed
Chapter 14 — Choosing in the MV* family
Roadmap
1. Selection matrix
2. One Context, three shells
3. Toward Part IV
Takeaways
Chapter 14 Quiz
3 attempts allowed
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 15 Quiz
3 attempts allowed
Chapter 16 — Hexagonal, Onion, and Clean Architecture
Roadmap
1. Inward dependencies
2. Ports deliver players into a Context
3. Interactors versus Contexts
Takeaways
Chapter 16 Quiz
3 attempts allowed
Chapter 17 — CQRS and Event Sourcing
Roadmap
1. Separate write and read
2. Context on the command side
3. Replay and limits
Takeaways
Chapter 17 Quiz
3 attempts allowed
Chapter 18 — The actor model
Roadmap
1. Message passing
2. In-process actors with a Context
3. Systems vs process-local actors
Takeaways
Chapter 18 Quiz
3 attempts allowed
Chapter 19 — Entity–Component–System
Roadmap
1. Data-oriented loops
2. ECS-shaped balances
3. When to choose which
Takeaways
Chapter 19 Quiz
3 attempts allowed
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 20 Quiz
3 attempts allowed
Chapter 21 — Traits, aspects, subject-oriented, Qi4j
Roadmap
1. Injection embeddings
2. Mixin-style Transfer
3. Where AOP and Qi4j fit
Takeaways
Chapter 21 Quiz
3 attempts allowed
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
Chapter 22 Quiz
3 attempts allowed
Part VI — DCI, then agents
Chapter 23 — DCI in depth: Data, Context, Interaction
Roadmap
1. Responsibilities, lifecycle, identity
Why no copies
2. Full Money Transfer
TypeScript (primary)
Ruby (Rails muscle memory)
Go (pointers as role-players)
trygve-shaped sketch (not executed here)
3. Testing and failure modes
Takeaways
Chapter 23 Quiz
3 attempts allowed
Chapter 24 — DCI by Example
Roadmap
1. The recipe
2. Library loan
3. Checkout
4. Dijkstra
What the three examples share
Takeaways
Chapter 24 Quiz
3 attempts allowed
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 25 Quiz
3 attempts allowed
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 26 Quiz
3 attempts allowed
Chapter 27 — DCI against the whole map
Roadmap
1. Layer cake
2. Decision cookbook
3. One-page checklist
Takeaways
Chapter 27 Quiz
3 attempts allowed
Chapter 28 — DCI and AI agents
Roadmap
1. Where the model sits
2. A runnable agent Context
3. Contexts as config
Takeaways
Chapter 28 Quiz
3 attempts allowed
Chapter 29 — Epilogue: habitability
Roadmap
1. Habitability
2. Closing—don’t worship the book
Chapter 29 Quiz
3 attempts allowed
Final Exam
Final Exam
2 attempts allowed
Sources and further reading
Primary
Also cited
Completing Object Orientation: The Course
Give use cases a readable home, from original MVC to DCI, in TypeScript and Rails.
MVC still describes what the system is; DCI gives a readable home to what it does, in TypeScript and Rails, and in agents whose choices stay inside a scene. Each chapter ends with a quiz, and a final exam earns you a certificate.
Minimum price
$149
$149
You pay
Author earns
About
About the Course
Completing Object Orientation
Give use cases a readable home, from original MVC to DCI, in TypeScript and Rails.
What You'll Learn
- Separate what the system is from what it does, and keep data simple
- Put a multi-object use case in a context with roles you can read from top to bottom
- Keep UI patterns such as ADR, MVVM, MVI, and VIPER as thin shells that trigger a context, rather than owning the algorithm
- Move a fat Rails model or a crowded service object into a context, use case by use case, without a rewrite
- Take Rich Hickey's critique of object orientation seriously, and judge the disagreement by habitability
- Let an AI model choose inside a role, while the context keeps the order, the limits, and the money
Who Is This Course For?
Software engineers and architects who already ship object-oriented or MVC systems and want a clearer place to put what the system does. Experience with TypeScript or Ruby on Rails helps, but the ideas are explained with worked examples.
Prerequisites
Comfort reading TypeScript or Ruby. No prior DCI experience is required. You can follow the TypeScript and Rails examples by typing them on your own machine; there is no companion repository to download.
Why This Course?
Instead of another architecture survey, you follow one running example — Money Transfer — from original MVC through roles and contexts, then into Rails and into agents whose choices stay inside a scene. If a context makes the use case clearer, use it. If a plain function is clearer today, ship the function. The test is habitability: can a teammate find the use case in one place?
How It Works
- 29 chapters, each ending with a 5-question multiple-choice quiz (3 attempts, best score counts)
- A 20-question final exam covering the whole course
- 165 quiz questions in total
- Score 70% to pass; 85% or more earns honors
- Pass to receive a certificate of completion
Written by Joel Bryan Juliano.
Instructor
About the Instructor
Hi, I'm Joel.
I am Dutch-Filipino Software Engineer with 20+ years of experience.
And with over 20 years in the game, I’ve seen it all and loved every minute of it.
My journey has taken me through a variety of industries, from sports streaming to cybersecurity, both in the private sector and for the Dutch government, and everything in between.
Along the way, I’ve picked up a diverse set of skills and experiences, in which I document into books.
Material
Course Material
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Write and Publish on Leanpub
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.