Tierless Web Programming in the Large

Tierless Web programming languages allow combining client-side and server-side programming in a single program. This allows defining expressions with both client and server parts, and at the same time provides good static guarantees regarding client-server communication. However, these nice properties come at a cost: most tierless languages offer very poor support for modularity and separate compilation. To regain this modularity and offer a larger-scale notion of composition, we propose to leverage a well-known tool: ML-style modules. In modern ML languages, the module system is a layer separate from the expression language. Eliom is an extension of OCaml for tierless Web programming which provides type-safe communication and an efficient execution model. In this article, we present how the Eliom module system combines the flexibility of tierless Web programming languages with a powerful module system, thus providing good support for abstraction, modularity and separate compilation. We also show that we can provide all these advantages while providing seamless integration with OCaml and its ecosystem.

[1]  Jérôme Vouillon,et al.  From bytecode to JavaScript: the Js_of_ocaml compiler , 2014, Softw. Pract. Exp..

[2]  Robin Milner,et al.  Definition of standard ML , 1990 .

[3]  Joeri De Koster,et al.  Dependence-driven delimited CPS transformation for JavaScript , 2016, GPCE.

[4]  Xavier Leroy,et al.  Applicative functors and fully transparent higher-order modules , 1995, POPL '95.

[5]  David B. MacQueen Modules for standard ML , 1984, LFP '84.

[6]  James Cheney,et al.  Effective Quotation , 2013, ArXiv.

[7]  Claudio V. Russo,et al.  F-ing modules , 2010, TLDI '10.

[8]  Manuel Serrano,et al.  A glimpse of Hopjs , 2016, ICFP.

[9]  Adam Chlipala,et al.  An optimizing compiler for a purely functional web-application language , 2015, ICFP.

[10]  Xin Zheng,et al.  Secure web applications via automatic partitioning , 2007, SOSP.

[11]  Simon L. Peyton Jones,et al.  Backpack: retrofitting Haskell with interfaces , 2014, POPL.

[12]  Karl Crary,et al.  Modules, abstraction, and parametric polymorphism , 2017, POPL.

[13]  Viktor Vafeiadis,et al.  Acute: high-level programming language design for distributed computation , 2005, ICFP '05.

[14]  Coen De Roover,et al.  Towards Tierless Web Development without Tierless Languages , 2014, Onward!.

[15]  Manuel Serrano,et al.  Reasoning about Web Applications: An Operational Semantics for HOP , 2012, TOPL.

[16]  Philip Wadler,et al.  Links: Web Programming Without Tiers , 2006, FMCO.

[17]  Karl Crary,et al.  Understanding and evolving the ml module system , 2005 .

[18]  Christian Queinnec,et al.  A multi-tier semantics for Hop , 2010, High. Order Symb. Comput..

[19]  Jérôme Vouillon,et al.  Eliom: tierless Web programming from the ground up , 2016, IFL 2016.

[20]  Gabriel Radanne,et al.  Tierless web programming in ML , 2017 .

[21]  Adam Chlipala,et al.  Ur/Web , 2015, Commun. ACM.

[22]  Jérôme Vouillon,et al.  Experience report: ocsigen, a web programming framework , 2009, ICFP.

[23]  Claudio V. Russo First-Class Structures for Standard ML , 2000, Nord. J. Comput..

[24]  Steven G. Johnson,et al.  The Design and Implementation of FFTW3 , 2005, Proceedings of the IEEE.

[25]  Jérôme Vouillon,et al.  Eliom: A Core ML Language for Tierless Web Programming , 2016, APLAS.

[26]  Oleg Kiselyov The Design and Implementation of BER MetaOCaml - System Description , 2014, FLOPS.

[27]  Vincent Balat Rethinking Traditional Web Interaction: Theory and Implementation , 2014 .

[28]  Damien Doligez,et al.  The OCaml system release 4.07: Documentation and user's manual , 2013 .

[29]  James Cheney,et al.  Effective quotation: relating approaches to language-integrated query , 2013, PEPM '14.

[30]  Karl Crary,et al.  Towards a mechanized metatheory of standard ML , 2007, POPL '07.

[31]  Koen Claessen,et al.  A seamless, client-centric programming model for type safe web applications , 2014, Haskell.

[32]  M. Tofte Operational Semantics and Polymorphic Type Inference , 1988 .

[33]  Xavier Leroy,et al.  Manifest types, modules, and separate compilation , 1994, POPL '94.

[34]  Yaron Minsky,et al.  Real world OCaml , 2013 .