Multi-tier functional reactive programming for the web

Bob Reynders, Dominique Devriese, Frank Piessens

Research output: Chapter in Book/Report/Conference proceedingConference paperResearch

25 Citations (Scopus)

Abstract

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 relevant 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 compos-able. 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 preloading clients with the latest application state. Our results show that multi-tier FRP is a promising, declarative, yet practical way of writing web applications.

Original languageEnglish
Title of host publicationOnward! 2014 - Proceedings of the 2014 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software, Part of SPLASH 2014
PublisherAssociation for Computing Machinery, Inc
Pages55-68
Number of pages <span style="color:red"p> <font size="1.5"> ✽ </span> </font>14
ISBN (Electronic)9781450332101
DOIs
Publication statusPublished - 1 Jan 2014
Event2014 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software, Onward! 2014 -Part of SPLASH 2014 - Portland, United States
Duration: 20 Oct 201424 Oct 2014

Conference

Conference2014 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software, Onward! 2014 -Part of SPLASH 2014
Country/TerritoryUnited States
CityPortland
Period20/10/1424/10/14

Keywords

  • FRP
  • Functional reactive programming
  • Multitier web framework

Fingerprint

Dive into the research topics of 'Multi-tier functional reactive programming for the web'. Together they form a unique fingerprint.

Cite this