Immediate mode UI programming is based on continually drawing the UI in a render loop, handling events in between frames using ordinary control-flow. This supports straightforward understanding and debugging of UI code, without inversion of control. In this paper I present TwoStones, a simple DSL for immediate mode Web UI programming in a purely functional style: it presumes a single, immutable application model which is updated functionally through the use of cursors (a kind of zipper). Relying only on immutable data means that time-travel debugging and undo-facilities are easy to implement. For exposition purposes, the semantics of TwoStones is first decomposed in two parts: one semantics for rendering, and one semantics for event handling. Finally, they are merged again for better performance. A number of examples show the potential of the approach.

Tue 4 Apr

proweb-2017-papers
13:30 - 15:00: ProWeb 2017 - Collaboration and responsiveness on the future web at D2.09
proweb-2017-papers13:30 - 13:55
Talk
proweb-2017-papers13:55 - 14:20
Talk
Lucas Wiener, Tomas Ekholm, Philipp HallerKTH Royal Institute of Technology
Pre-print
proweb-2017-papers14:20 - 14:45
Talk
Pre-print
proweb-2017-papers14:45 - 15:00
Talk