dc.description.abstract | Graphical user interfaces (GUIs) are everywhere. They serve as the primary means of interaction between an application and its users. Developing GUIs with complex dataflows, where multiple elements depend on each other's input, is challenging. GUI dataflows often include asynchronous operations, and are typically implemented as chains—or graphs—of JavaScript promises.
Event coalescing strategies, like debouncing and throttling, are common techniques for dealing with a large number of GUI events. In GUIs with complex dataflows, these techniques are a source of subtle bugs: event coalescing easily breaks modularity. When a program needs to get data from a promise at the end of a dataflow, the programmer needs to know if the source of the data is being delayed by event coalescing.
This thesis proposes an extension to the JavaScript promise abstraction: the ability to "flush" a promise chain. An arbitrary promise anywhere in a promise chain can signal the first promise of the promise chain to resolve. We call this extended version of promises flushable promises. With flushable promises, event coalescing strategies can be implemented in a less fragile manner, improving the modularity and separation of concerns in programming GUIs with complex dataflows. | |