Leanpub Header

Skip to main content

Completing Object Orientation

From MVC to DCI (and AI Agents)

Completing Object Orientation

MVC showed what the system is. DCI shows what it does—readable Contexts and Roles from Xerox PARC through today’s agent playbooks. Practical TypeScript and Rails examples, end to end.

Minimum price

$19.00

$29.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
WEB
APP
About

About

About the Book

Most teams learned "MVC" from a web framework. The original idea, developed at Xerox PARC, was more precise: a way to keep a mental model of the system's data in view. What a system does—the collaborations people actually pay for—often landed in a fat model, a fat controller, or a service object that hid the work. The next use case became harder to read than the last.

Completing Object Orientation is a working path into Data, Context, and Interaction. MVC still describes what the system is. DCI gives a readable home to what it does: roles inside a context, so a use case can be read from top to bottom. If a context makes the use case clearer, use it. If a plain function is clearer today, ship the function.

The book starts at PARC MVC and at roles in OOram, then walks the MVC family and neighboring architectures, leaving your existing shells in place. Money Transfer is the running example. In TypeScript and Ruby on Rails, the transfer is built end to end, three further use cases follow the same recipe, and a fat Rails model moves into a context. Rich Hickey's critique of object orientation is taken seriously and fairly. The same habit is then carried into AI agents: a model can choose inside a role, while the context keeps the order, the limits, and the money.

The test throughout is habitability: can a teammate find the use case in one place, and see how the system will work?

Author

About the Author

Joel Bryan Juliano

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.

Contents

Table of Contents

Dedication

Prelude — Uneducation, diskarte, and patterns

Prologue — Why I wrote this book

  1. How I found MVC and DCI
  2. What this book covers
  3. How to use this book

Part I — History

Chapter 1 — Smalltalk, PARC, and Thing–Model–View–Editor → MVC

  1. Roadmap
  2. 1. Design before code
  3. 2. Smalltalk, PARC, and MVC (1978–79)
  4. 3. What MVC leaves open
  5. Takeaways

Chapter 2 — Roles before DCI: OOram, then Data–Context–Interaction

  1. Roadmap
  2. 1. OOram: roles after MVC
  3. 2. DCI: Data, Context, Interaction
  4. 3. Coplien’s bridges—and the Rails path
  5. Takeaways

Part II — Foundations

Chapter 3 — Mental models: what the system is vs what it does

  1. Roadmap
  2. 1. Class-oriented vs object-oriented
  3. 2. Dual mental models
  4. 3. Runnable contrast
  5. Takeaways

Chapter 4 — Basic collaboration patterns that matter

  1. Roadmap
  2. 1. Four patterns that foreshadow roles
  3. 2. Composition over inheritance
  4. 3. The honest limit
  5. Takeaways

Chapter 5 — Use cases, algorithms, and roles

  1. Roadmap
  2. 1. Theatre and cue scripts
  3. 2. Money Transfer as a Context
  4. 3. UML binders vs readable code
  5. Takeaways

Part III — The MVC family

Chapter 6 — Original MVC in practice

  1. Roadmap
  2. 1. MVC bridges to the user’s data model
  3. 2. A tiny MVC loop
  4. 3. What MVC refuses to own
  5. Takeaways

Chapter 7 — How “MVC” mutated on the web

  1. Roadmap
  2. 1. Why the word drifted
  3. 2. Fat controller, fat model
  4. 3. Service object → Context
  5. Takeaways

Chapter 8 — Action–Domain–Responder (ADR)

  1. Roadmap
  2. 1. Why ADR
  3. 2. Transfer in ADR shape
  4. 3. Rails and the DCI handoff
  5. Takeaways

Chapter 9 — MVP (Potel / Taligent, 1996)

  1. Roadmap
  2. 1. Passive View
  3. 2. Transfer Presenter (UI only)
  4. 3. Keep Presenters at the glass
  5. Takeaways

Chapter 10 — MVVM (Gossman / Microsoft, 2005)

  1. Roadmap
  2. 1. ViewModel
  3. 2. TransferViewModel
  4. 3. Roles stay out of the VM
  5. Takeaways

Chapter 11 — Coordinators and MVVM-C

  1. Roadmap
  2. 1. Navigation leaves the ViewModel
  3. 2. Flow vs Interaction
  4. 3. Checklist
  5. Takeaways

Chapter 12 — MVI and The Elm Architecture (TEA)

  1. Roadmap
  2. 1. One-way UI
  3. 2. Transfer form as UI state
  4. 3. Sister pattern, not a rival
  5. Takeaways

Chapter 13 — VIPER and Clean-inspired mobile splits

  1. Roadmap
  2. 1. Five parts
  3. 2. Transfer in VIPER shape
  4. 3. Decision notes
  5. Takeaways

Chapter 14 — Choosing in the MV* family

  1. Roadmap
  2. 1. Selection matrix
  3. 2. One Context, three shells
  4. 3. Toward Part IV
  5. Takeaways

Part IV — Complex application architectures

Chapter 15 — Domain-Driven Design

  1. Roadmap
  2. 1. What DDD already solves
  3. 2. Transfer across aggregates
  4. 3. Language alignment
  5. Takeaways

Chapter 16 — Hexagonal, Onion, and Clean Architecture

  1. Roadmap
  2. 1. Inward dependencies
  3. 2. Ports deliver players into a Context
  4. 3. Interactors versus Contexts
  5. Takeaways

Chapter 17 — CQRS and Event Sourcing

  1. Roadmap
  2. 1. Separate write and read
  3. 2. Context on the command side
  4. 3. Replay and limits
  5. Takeaways

Chapter 18 — The actor model

  1. Roadmap
  2. 1. Message passing
  3. 2. In-process actors with a Context
  4. 3. Systems vs process-local actors
  5. Takeaways

Chapter 19 — Entity–Component–System

  1. Roadmap
  2. 1. Data-oriented loops
  3. 2. ECS-shaped balances
  4. 3. When to choose which
  5. Takeaways

Part V — Exotic and adjacent

Chapter 20 — Naked Objects, PAC, HMVC

  1. Roadmap
  2. 1. Naked Objects
  3. 2. PAC and HMVC
  4. 3. Auto-UI Account vs Transfer Context
  5. Takeaways

Chapter 21 — Traits, aspects, subject-oriented, Qi4j

  1. Roadmap
  2. 1. Injection embeddings
  3. 2. Mixin-style Transfer
  4. 3. Where AOP and Qi4j fit
  5. Takeaways

Chapter 22 — Steelman the critics: Hickey and data-first design

  1. Roadmap
  2. 1. Data-first cousins
  3. 2. What Hickey actually argues
  4. 3. Where Hickey and DCI already agree
  5. 4. Where they part—and a fair comparison
  6. Takeaways

Part VI — DCI, then agents

Chapter 23 — DCI in depth: Data, Context, Interaction

  1. Roadmap
  2. 1. Responsibilities, lifecycle, identity
  3. 2. Full Money Transfer
  4. 3. Testing and failure modes
  5. Takeaways

Chapter 24 — DCI by Example

  1. Roadmap
  2. 1. The recipe
  3. 2. Library loan
  4. 3. Checkout
  5. 4. Dijkstra
  6. What the three examples share
  7. Takeaways

Chapter 25 — From a fat Rails model to a Context

  1. Roadmap
  2. 1. Before
  3. 2. Pin the behavior
  4. 3. Move the body, unchanged
  5. 4. Name the roles
  6. 5. The controller, and the next rule
  7. Takeaways

Chapter 26 — Why DCI fits: completing MVC

  1. Roadmap
  2. 1. Completing the pair
  3. 2. Screen gesture → Context
  4. 3. What DCI is not—and a brownfield path
  5. Takeaways

Chapter 27 — DCI against the whole map

  1. Roadmap
  2. 1. Layer cake
  3. 2. Decision cookbook
  4. 3. One-page checklist
  5. Takeaways

Chapter 28 — DCI and AI agents

  1. Roadmap
  2. 1. Where the model sits
  3. 2. A runnable agent Context
  4. 3. Contexts as config
  5. Takeaways

Chapter 29 — Epilogue: habitability

  1. Roadmap
  2. 1. Habitability
  3. 2. Closing—don’t worship the book

Sources and further reading

  1. Primary
  2. Also cited

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

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.

Learn more about writing on Leanpub