module DCI

Data, Context and Interaction (DCI) is a paradigm used in computer software to program systems of communicating objects. Its goals are:

first-class status;

from code for slowly changing domain knowledge (what the system is), instead of combining both in one class interface;

instead of only object state and behavior;

models, rather than the class style of thinking that overshadowed object thinking early in the history of object-oriented programming languages.

The paradigm separates the domain model (data) from use cases (context) and roles that objects play (interaction). DCI is complementary to model–view–controller (MVC). MVC as a pattern language is still used to separate the data and its processing from presentation.

DCI was invented by Trygve Reenskaug, also the inventor of MVC. The current formulation of DCI is mostly the work of Reenskaug and James O. Coplien.

acct1 = Account.new(10500)
acct2 = Account.new(10010)

Balance::Transfer.new(acct1, acct2).transfer(50)