DCI in Haxe
Haxe is a nice multiplatform language which enables a full DCI implementation. If you don't know what DCI is, keep reading, you're in for a treat!
DCI stands for Data, Context, Interaction. The key aspects of the DCI architecture are:
- Separating what the system is (data) from what it does (function). Data and function have different rates of change so they should be separated, not as it currently is, put in classes together.
- Create a direct mapping from the user's mental model to code. The computer should think as the user, not the other way around.
- Make system behavior a first class entity.
- Great code readability with no surprises at runtime.
Browse to the haxedci-example repository for a syntax explanation of the library, a longer introduction to DCI, and a demo.
Download and Install
Install via haxelib:
haxelib install haxedci
-lib haxedci into your hxml.
Because of the special syntax, there are some problems with autocompletion for Roles. When inside a Role, not all of its RoleMethods may show up.