Multi-tier Functional Reactive Programming for the Web
The development of robust and efficient interactive web applications is challenging, because developers have to deal with multiple programming languages, asynchronous events, propagating data and events between clients and servers, data consistency and much more. Several approaches for (partly) addressing these challenges have been proposed. Two important ones are (1) multi-tier languages and (2) functional reactive programming (FRP). Multi-tier programming languages support the development of client and server in a single language, and hide much of the complexity related to distribution. FRP offers the right abstractions to make event-driven programming convenient, safe and composable. The existence of mature and widely used implementations of both these approaches is evidence of their usefulness. However, existing web frameworks and programming languages exploit the benefits of both approaches separately, for example by restricting the use of FRP to the client side.
We propose multi-tier FRP for the Web, a novel approach to writing web applications that deeply integrates FRP and multi-tier languages, and where the whole is greater than the sum of its parts. In multi-tier FRP, the developer programs server and client together as an FRP application composed of behaviors (signals) and events. He/she chooses explicitly where the boundary between server and client is crossed. To make our approach more concrete and provide evidence of its potential, this paper presents a concrete design and implementation of a multi-tier FRP API for the web in the programming language Scala, using an embedded JavaScript DSL that makes Scala usable as a multi-tier language. This allows us to present initial evidence of the benefits of the multi-tier FRP approach on example applications, and to experiment with possible answers to the remaining questions. Concretely, we show possible solutions for problems like exposing client identity on the server and efficiently pre-loading clients with the latest application state. Our results show that multi-tier FRP is a promising, declarative, yet practical way of writing web applications.
Thu 23 Oct Times are displayed in time zone: Tijuana, Baja California change
10:30 - 12:00 | |||
10:30 22mTalk | Multi-tier Functional Reactive Programming for the Web Onward! Papers Bob ReyndersiMinds - Distrinet, KU Leuven, Dominique DevrieseiMinds - Distrinet, KU Leuven, Frank PiessensiMinds - Distrinet, KU Leuven | ||
10:52 22mTalk | Towards Tierless Programming in a General-Purpose Language Onward! Papers Laure PhilipsSoftware Languages Lab, Coen De RooverSoftware Languages Lab, Software Engineering Laboratory, Tom Van CutsemAlcatel-Lucent Bell Labs, Wolfgang De MeuterVrije Universiteit Brussel | ||
11:15 22mTalk | Capturing and Exploiting IDE Interactions Onward! Papers Zhongxian GuUC Davis, Drew SchleckUC Davis, Earl T. BarrUniversity College London, Zhendong SuUniversity of California, Davis | ||
11:37 22mTalk | A Language Designer’s Workbench. A One-Stop-Shop for Implementation and Verification of Language Designs Onward! Papers Eelco VisserDelft University of Technology, Guido WachsmuthDelft University of Technology, Andrew TolmachPortland State University, Pierre NeronTU Delft, Vlad VerguTU Delft, Augusto PassalaquaTU Delft, Gabriël KonatDelft University of Technology Media Attached |