Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jpinnix
Created February 13, 2014 14:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jpinnix/8975830 to your computer and use it in GitHub Desktop.
Save jpinnix/8975830 to your computer and use it in GitHub Desktop.
Notes from presentation by Trygve Reenskaug - Object Orientation Revisited. Simplicity and power with DCI.

“Object Orientation Revisited. Simplicity and power with DCI.” by Trygve Reenskaug

Great presentation by Trygve Reenskaug, the creator of MVC, on an extension of OO principles, called DCI (Data, Context, Interaction). If you are a programmer, watch this on Vimeo!

A DCI Class says everything about the inside of an object and nothing about its neighbors.

A DCI Context says everything about a network of communicating objects and nothing about their insides.

The DCI paradigm

Work with code in different perspectives:

  1. Data Objects for what the system IS
    • Domain and other objects
    • Restricted OO simplify classes (not allowed to send out messages)
  2. Context for each use case:
    • Full OO for runtime:
    • Marshals participating role-playing objects for runtime communication network.
  3. Interaction for what the system DOES
    • Role methods specify runtime behavior

DCI Benefits

  1. "Testing shows the presence, not the absence of bugs" - Dijkstra
  2. Use good design for separation of concerns, avoiding complex faults
  3. DCI gives readable code:
    • Code that we can reason about,
    • Code that can be independently audited,
    • Code that reveals everything about how a system will work.
  4. DCI gives powerful mental models
  5. Use code reading to get it right.
    • Use tests to confirm that you have got it right.
@ciscoheat
Copy link

Thanks, nice overview!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment