ABSTRACT
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.
- Vincent Balat. 2014. Rethinking Traditional Web Interaction: Theory and Implementation. International Journal on Advances in Internet Technology (2014). http://www.iariajournals.org/internet_technology/Google Scholar
- Vincent Balat, Jérôme Vouillon, and Boris Yakobowski. 2009. Experience report: Ocsigen, a Web programming framework. In ICFP, Graham Hutton and Andrew P. Tolmach (Eds.). ACM, 311--316. Google ScholarDigital Library
- Gérard Boudol, Zhengqin Luo, Tamara Rezk, and Manuel Serrano. 2012. Reasoning about Web Applications: An Operational Semantics for HOP. ACM Trans. Program. Lang. Syst. 34, 2 (2012), 10. Google ScholarDigital Library
- James Cheney, Sam Lindley, Gabriel Radanne, and Philip Wadler. 2013. Effective Quotation. CoRR abs/1310.4780 (2013). http://arxiv.org/abs/1310.4780Google Scholar
- Adam Chlipala. {n. d.}. Ur/Web: A Simple Model for Programming the Web (POPL '15). Google ScholarDigital Library
- Adam Chlipala. 2015. An Optimizing Compiler for a Purely Functional WebApplication Language. In ICFP. Google ScholarDigital Library
- Ezra Cooper, Sam Lindley, Philip Wadler, and Jeremy Yallop. 2006. Links: Web Programming Without Tiers. In FMCO. 266--296. Google ScholarDigital Library
- Karl Crary. 2017. Modules, abstraction, and parametric polymorphism, Giuseppe Castagna and Andrew D. Gordon (Eds.). http://dl.acm.org/citation.cfmid= 3009892 Google ScholarDigital Library
- Derek Dreyer. 2005. Understanding and Evolving the ML Module System. Ph.D. Dissertation. Carnegie Mellon University. https://people.mpi-sws.org/~dreyer/thesis/main.pdf Google ScholarDigital Library
- Anton Ekblad and Koen Claessen. {n. d.}. A Seamless, Client-centric Programming Model for Type Safe Web Applications (Haskell '14). Google ScholarDigital Library
- Eliom 2017. Eliom web site. https://ocsigen.org/eliom.Google Scholar
- Hashids 2017. Hashids. http://hashids.org/.Google Scholar
- Scott Kilpatrick, Derek Dreyer, Simon L. Peyton Jones, and Simon Marlow. 2014. Backpack: retrofitting Haskell with interfaces.Google Scholar
- Oleg Kiselyov. 2014. The Design and Implementation of BER MetaOCaml (Lecture Notes in Computer Science), Michael Codish and Eijiro Sumii (Eds.), Vol. 8475. Springer.Google Scholar
- Daniel K. Lee, Karl Crary, and Robert Harper. 2007. Towards a mechanized metatheory of standard ML, Martin Hofmann and Matthias Felleisen (Eds.). ACM. Google ScholarDigital Library
- Xavier Leroy. 1994. Manifest Types, Modules, and Separate Compilation, HansJuergen Boehm, Bernard Lang, and Daniel M. Yellin (Eds.). ACM Press. Google ScholarDigital Library
- Xavier Leroy. 1995. Applicative Functors and Fully Transparent Higher-Order Modules, Ron K. Cytron and Peter Lee (Eds.). ACM Press. Google ScholarDigital Library
- Xavier Leroy, Damien Doligez, Alain Frisch, Jacques Garrigue, Didier Rémy, and Jérôme Vouillon. 2016. The OCaml system release 4.04, Documentation and user's manual. Projet Gallium, INRIA.Google Scholar
- David B. MacQueen. 1984. Modules for Standard ML. In LISP and Functional Programming. 198--207. Google ScholarDigital Library
- Meteor.js 2017. Meteor.js. http://meteor.com.Google Scholar
- Robin Milner, Mads Tofte, and Robert Harper. 1990. Definition of standard ML. MIT Press. Google ScholarDigital Library
- Yaron Minsky, Anil Madhavapeddy, and Jason Hickey. 2013. Real World OCaml - Functional Programming for the Masses. O'Reilly. https://realworldocaml.org/Google Scholar
- MLton 2014. MLton. (2014). http://mlton.org/HomeGoogle Scholar
- Olivier Nicole. 2016. Bringing typed, modular macros to OCaml. (2016). https: //oliviernicole.github.io/about_macros.htmlGoogle Scholar
- Ocsigen Toolkit 2017. Ocsigen Toolkit. http://ocsigen.org/ocsigen-toolkit/.Google Scholar
- Laure Philips, Coen De Roover, Tom Van Cutsem, and Wolfgang De Meuter. 2014. Towards Tierless Web Development Without Tierless Languages (Onward! 2014). 69--81. Google ScholarDigital Library
- Laure Philips, Joeri De Koster, Wolfgang De Meuter, and Coen De Roover. 2016. Dependence-driven delimited CPS transformation for JavaScript. Google ScholarDigital Library
- Gabriel Radanne. 2017. Tierless Web Programming in ML. Ph.D. Dissertation. Paris Diderot. https://www.irif.fr/~gradanne/papers/phdthesis.pdfGoogle Scholar
- Gabriel Radanne, Vasilis Papavasileiou, Jérôme Vouillon, and Vincent Balat. 2016. Eliom: tierless Web programming from the ground up, Tom Schrijvers (Ed.). ACM. Google ScholarDigital Library
- Gabriel Radanne, Jérôme Vouillon, and Vincent Balat. 2016. Eliom: A Core ML Language for Tierless Web Programming (Lecture Notes in Computer Science).Google ScholarDigital Library
- Andreas Rossberg, Claudio V. Russo, and Derek Dreyer. 2014. F-ing modules. J. Funct. Program. 24, 5 (2014), 529--607.Google ScholarCross Ref
- Claudio V. Russo. 2000. First-Class Structures for Standard ML. Nord. J. Comput. 7, 4 (2000), 348--374. Google ScholarDigital Library
- Manuel Serrano and Vincent Prunet. 2016. A glimpse of Hopjs, Jacques Garrigue, Gabriele Keller, and Eijiro Sumii (Eds.). ACM. Google ScholarDigital Library
- Manuel Serrano and Christian Queinnec. 2010. A multi-tier semantics for Hop. Higher-Order and Symbolic Computation 23, 4 (2010), 409--431. Google ScholarDigital Library
- Peter Sewell, James J. Leifer, Keith Wansbrough, Francesco Zappa Nardelli, Mair Allen-Williams, Pierre Habouzit, and Viktor Vafeiadis. 2007. Acute: High-level programming language design for distributed computation. J. Funct. Program. (2007). Google ScholarDigital Library
- Mads Tofte. 1988. Operational Semantics and Polymorphic Type Inference. Ph.D. Dissertation. University of Edinburgh.Google Scholar
- TyXML 2017. TyXML. http://ocsigen.org/tyxml/.Google Scholar
- Jérôme Vouillon and Vincent Balat. 2014. From bytecode to JavaScript: the Js_- of_ocaml compiler. Software: Practice and Experience (2014). Google ScholarDigital Library
- Jeremy Yallop and Leo White. 2015. Modular macros. OCaml Workshop (2015). http://www.lpw25.net/ocaml2015-abs1.pdfGoogle Scholar
Index Terms
- Tierless Web Programming in the Large
Recommendations
Eliom: tierless Web programming from the ground up
IFL 2016: Proceedings of the 28th Symposium on the Implementation and Application of Functional Programming LanguagesEliom is a dialect of OCaml for Web programming. It can be used both server and client-side. Server and client sections can also be mixed in the same file using syntactic annotations. This allows one to build a whole application as a single program, in ...
Parallel compilation: A design and its application to SIMULA 67
A design for a separate compilation facility for the SIMULA 67 programming language is presented. The paper explores the problems with existing separate compilation schemes, and proposes a new scheme that allows top-down, bottom-up, or even parallel ...
A simple separate compilation mechanism for block-structured languages
A very simple and efficient technique for the introduction of separate compilation facilities into compilers for block-structured languages is presented. Using this technique, programs may be compiled in parts while the compile-time checking advantages ...
Comments