-
Notifications
You must be signed in to change notification settings - Fork 47
ReactFX vs ReactiveX
ReactiveX (Reactive Extensions) is a "framework for asynchronous programming with observable streams." Implementations in multiple languages exist, such as RxJava (Reactive Extensions for the JVM).
The key difference from ReactiveX is that event propagation in ReactFX is (almost always) synchronous.
This is consistent with change propagation in JavaFX bindings.
Synchronous event propagation allows for more coordination between event streams, which reduces the number of glitches (temporary inconsistencies in observable state). With ReactiveX, one has to settle for eventual consistency, which in the context of UI programming would frequently result in UI glitches.
The only exceptions to synchronous event propagation are asynchronous operations like await, successionEnds or threadBridge.
Event propagation in ReactFX stays within one thread (except, obviously, for threadBridge). This means that when an event source produces events on one thread, you don't have to worry that they will be delivered on a different thread. In the context of JavaFX, this means that you don't have to wrap UI manipulating actions in Platform.runLater if the events leading to the action originated from the JavaFX application thread.
ReactFX contains a bunch of JavaFX specific adapters and other utilities, such as JavaFX-based timers.