Abstract
Modern web applications are heavily dynamic. Several approaches, including functional reactive programming and data binding, allow a presentation layer to automatically reflect changes in a data layer. However, many of these techniques are prone to unpredictable memory performance, do not make guarantees about node identity, or cannot easily express dynamism in the dataflow graph.
We identify a point in the design space for the creation of statically-typed, reactive, dynamic, single-page web applications for the WebSharper framework in the functional-first language F#. We provide an embedding abstraction to link a dynamic dataflow graph to a DOM presentation layer in order to implement dynamic single-page applications, and show how the technique can be used to support declarative animation.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
React | A JavaScript Library for Building User Interfaces (2014). http://facebook.github.io/react/
Bjornson, J., Tayanovskyy, A., Granicz, A.: Composing reactive GUIs in F# using websharper. In: Hage, J., Morazán, M.T. (eds.) IFL. LNCS, vol. 6647, pp. 203–216. Springer, Heidelberg (2011)
Bostock, M.: Object Constancy (2012). http://bost.ocks.org/mike/constancy/
Bostock, M., Ogievetsky, V., Heer, J.: D3: Data-Driven Documents. IEEE Transactions on Visualization and Computer Graphics 17(12), 2301–2309 (2011)
Czaplicki, E., Chong, S.: Asynchronous functional reactive programming for GUIs. In: PLDI 2013, New York, NY, USA (2013)
Denuzière, L., Rodriguez, E., Granicz, A.: Piglets to the Rescue. In: IFL 2013, Nijmegen, The Netherlands (2013)
Elliott, C., Hudak, P.: Functional reactive animation. In: ICFP 1997, vol. 32, no. 8, pp. 263–273. ACM, New York (1997)
Elsman, M.: SMLtoJs: Hosting a Standard ML Compiler in a Web Browser. In: PLASTIC 2011, Portland, OR, USA (2011)
Heer, J., Bostock, M.: Declarative Language Design for Interactive Visualization. IEEE Transactions on Visualization and Computer Graphics 16(6), 1149–1156 (2010)
Hughes, J.: Generalising monads to arrows. Science of Computer Programming 37(1–3), 67–111 (2000)
Krishnaswami, N.R.: Higher-order functional reactive programming without spacetime leaks. In: ICFP 2013, New York, NY, USA (2013)
Meyerovich, L.A., Guha, A., Baskin, J., Cooper, G.H., Greenberg, M., Bromfield, A., Krishnamurthi, S.: Flapjax: a programming language for ajax applications. In: OOPSLA 2009, New York, NY, USA (2009)
Nilsson, H., Courtney, A., Peterson, J.: Functional reactive programming, continued. In: Haskell 2002, New York, NY, USA (2002)
Plasmeijer, R., Achten, P., Koopman, P.: iTasks: executable specifications of interactive work flow systems for the web. In: ICFP 2007, New York, NY, USA (2007)
Reppy, J.H.: Concurrent programming in ML. Cambridge University Press (2007)
Syme, D., Battocchi, K., Takeda, K., Malayeri, D., Fisher, J., Hu, J., Liu, T., McNamara, B., Quirk, D., Taveggia, M., Chae, W., Matsveyeu, U., Petricek, T.: Strongly-typed language support for internet-scale information sources. Technical report, Technical Report MSR-TR-2012-101, Microsoft Research (2012a)
Syme, D., Granicz, A., Cisternino, A.: Expert F# 3.0. APress (2012b)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
Fowler, S., Denuzière, L., Granicz, A. (2015). Reactive Single-Page Applications with Dynamic Dataflow. In: Pontelli, E., Son, T. (eds) Practical Aspects of Declarative Languages. PADL 2015. Lecture Notes in Computer Science(), vol 9131. Springer, Cham. https://doi.org/10.1007/978-3-319-19686-2_5
Download citation
DOI: https://doi.org/10.1007/978-3-319-19686-2_5
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-19685-5
Online ISBN: 978-3-319-19686-2
eBook Packages: Computer ScienceComputer Science (R0)