Reactive Single-Page Applications with Dynamic Dataflow

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9131)

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.

Keywords

Functional programming Reactive web applications F# 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    React | A JavaScript Library for Building User Interfaces (2014). http://facebook.github.io/react/
  2. 2.
    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) CrossRefGoogle Scholar
  3. 3.
    Bostock, M.: Object Constancy (2012). http://bost.ocks.org/mike/constancy/
  4. 4.
    Bostock, M., Ogievetsky, V., Heer, J.: D3: Data-Driven Documents. IEEE Transactions on Visualization and Computer Graphics 17(12), 2301–2309 (2011)CrossRefGoogle Scholar
  5. 5.
    Czaplicki, E., Chong, S.: Asynchronous functional reactive programming for GUIs. In: PLDI 2013, New York, NY, USA (2013)Google Scholar
  6. 6.
    Denuzière, L., Rodriguez, E., Granicz, A.: Piglets to the Rescue. In: IFL 2013, Nijmegen, The Netherlands (2013)Google Scholar
  7. 7.
    Elliott, C., Hudak, P.: Functional reactive animation. In: ICFP 1997, vol. 32, no. 8, pp. 263–273. ACM, New York (1997)Google Scholar
  8. 8.
    Elsman, M.: SMLtoJs: Hosting a Standard ML Compiler in a Web Browser. In: PLASTIC 2011, Portland, OR, USA (2011)Google Scholar
  9. 9.
    Heer, J., Bostock, M.: Declarative Language Design for Interactive Visualization. IEEE Transactions on Visualization and Computer Graphics 16(6), 1149–1156 (2010)CrossRefGoogle Scholar
  10. 10.
    Hughes, J.: Generalising monads to arrows. Science of Computer Programming 37(1–3), 67–111 (2000)CrossRefMATHMathSciNetGoogle Scholar
  11. 11.
    Krishnaswami, N.R.: Higher-order functional reactive programming without spacetime leaks. In: ICFP 2013, New York, NY, USA (2013)Google Scholar
  12. 12.
    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)Google Scholar
  13. 13.
    Nilsson, H., Courtney, A., Peterson, J.: Functional reactive programming, continued. In: Haskell 2002, New York, NY, USA (2002)Google Scholar
  14. 14.
    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)Google Scholar
  15. 15.
    Reppy, J.H.: Concurrent programming in ML. Cambridge University Press (2007)Google Scholar
  16. 16.
    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)Google Scholar
  17. 17.
    Syme, D., Granicz, A., Cisternino, A.: Expert F# 3.0. APress (2012b)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  1. 1.University of EdinburghEdinburghScotland
  2. 2.IntelliFactoryBudapestHungary

Personalised recommendations