Examples Written in Haxe
Haxe is a nice multiplatform language which enables a full DCI implementation. It's a good starting point for learning about DCI, since the language is easy to read (similar to Typescript) but has also DCI semantics thanks to its macro feature.
The Haxe/DCI examples are as follows:
Money transfer - A tutorial that step by step creates the good old money transfer example.
Library borrow machine - Simulates a machine at libraries that enables library card holders to borrow books.
- Illustrates the close mapping between use cases and code in DCI.
- Shows interaction between different parts of hardware.
- Live demo is available here (pin code is 1234).
SnakeDCI - Creates the classic Snake game in Haxe using DCI and a game library.
- Illustrates again the close mapping between use cases and code in DCI.
- Demonstrates how immutable data (game state) works well with DCI Contexts.
- Live demo is available here.