ReactiveDominoJ: A practical implementation of an expand event system supporting reactive programming
The ReactiveDominoJ language
Introduction
ReactiveDominoJ extends DominoJ, a Java-based langauge that can be used as an event system, to support the automation of handler bindings, which means that a handler can be implicitly bound to all the involved events that are automatically found inside itself.
Syntax
To enable the automation in a handler:
{_} += <handler>;
The symbol _ refers to the method slot at the right-hand side. It is syntax sugar for the following syntax.
{<handler>} += <handler>;
As using DominoJ as an event system, this statement binds the handler at the right-hand side to the event at the left-hand side. However, in DominoJ all the events involved in the body of a handler must be manually inferred, and a handler can only be bound to an event in a binding statement. ReactiveDominoJ makes it possible to automatically infer all the involved events inside the handler and then implicitly bind the handelr itself to all of them.
Publications
-
Enabling the Automation of Handler Bindings in Event-Driven Programming
YungYu Zhuang and Shigeru Chiba
In proceedings of the 39th annual international Computers, Software & Applications Conference (COMPSAC'15)
Get Copy Slides -
Automatic Event Composition
YungYu Zhuang and Shigeru Chiba
Poster Event, Modularity'14, 2014 April 22.
-
Extending Event-driven Programming to Support Reactive Programming by Adding an Interface Mechanism
YungYu Zhuang and Shigeru Chiba
Poster Event, MODULARITY: aosd•2013, 2013 March 25.
The ReactiveDominoJ compiler
Download
- The ReactiveDominoJ compiler on GitHub Source files of the ReactiveDominoJ compiler. It is built on top of DominoJ and JastAddJ.
- ReactiveDominoJCompiler.jar The ReactiveDominoJ compiler. The usage is shown below.
- dominoj.jar The DominoJ library. Please add it into classpath when executing ReactiveDominoJ programs.
- rdominoj-examples.zip The examples of using the braces operator.
- rdominoj-testcases.zip Sample code for testing the braces operator.
Source code
Binary distribution
Usage
To compile a source file written in ReactiveDominoJ:
java -jar ReactiveDominoJCompiler.jar MyClass.java
The execution is the same as other Java programs.
java -cp dominoj.jar:. MyClass