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.
Work with code in different perspectives:
- Data Objects for what the system IS
- Domain and other objects
- Restricted OO simplify classes (not allowed to send out messages)
- Context for each use case:
- Full OO for runtime:
- Marshals participating role-playing objects for runtime communication network.
- Interaction for what the system DOES
- Role methods specify runtime behavior
- "Testing shows the presence, not the absence of bugs" - Dijkstra
- Use good design for separation of concerns, avoiding complex faults
- 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.
- DCI gives powerful mental models
- Use code reading to get it right.
- Use tests to confirm that you have got it right.
Thanks, nice overview!