Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

A seamless, client-centric programming model for type safe web applications

Published: 03 September 2014 Publication History

Abstract

We propose a new programming model for web applications which is (1) seamless; one program and one language is used to produce code for both client and server, (2) client-centric; the programmer takes the viewpoint of the client that runs code on the server rather than the other way around, (3) functional and type-safe, and (4) portable; everything is implemented as a Haskell library that implicitly takes care of all networking code. Our aim is to improve the painful and error-prone experience of today's standard development methods, in which clients and servers are coded in different languages and communicate with each other using ad-hoc protocols. We present the design of our library called Haste.App, an example web application that uses it, and discuss the implementation and the compiler technology on which it depends.

References

[1]
V. Balat. "Ocsigen: typing web interaction with objective Caml." Proceedings of the 2006 workshop on ML. ACM, 2006.
[2]
J. Bracker and A. Gill. "Sunroof: A Monadic DSL for Generating JavaScript." In Practical Aspects of Declarative Languages, pp. 65--80. Springer International Publishing, 2014.
[3]
A. Chlipala. "Ur: statically-typed metaprogramming with type-level record computation." ACM Sigplan Notices. Vol. 45. No. 6. ACM, 2010.
[4]
K. Claessen. "Functional Pearls: A poor man's concurrency monad." Journal of Functional Programming 9 (1999): 313--324.
[5]
E. Cooper, S. Lindley, P. Wadler, and J. Yallop. Links: Web programming without tiers. In Formal Methods for Components and Objects (pp. 266--296). Springer Berlin Heidelberg, 2007.
[6]
The Conductance application server. Retrieved March 1, 2014, from http://conductance.io.
[7]
O. Danvy and L. R. Nielsen. "Defunctionalization at work." In Proceedings of the 3rd ACM SIGPLAN international conference on Principles and practice of declarative programming, pp. 162--174. ACM, 2001.
[8]
A. Dijkstra, J. Stutterheim, A. Vermeulen, and S. D. Swierstra. "Building JavaScript applications with Haskell." In Implementation and Application of Functional Languages, pp. 37--52. Springer Berlin Heidelberg, 2013.
[9]
L. Domoszlai, E. Bruël, and J. M. Jansen. "Implementing a non-strict purely functional language in JavaScript." Acta Universitatis Sapientiae 3 (2011): 76--98.
[10]
C. Done. (2012, September 15). "Fay, JavaScript, etc.", Retrieved March 1, 2014, from http://chrisdone.com/posts/fay.
[11]
A. Ekblad. "Towards a declarative web." Master of Science Thesis, University of Gothenburg (2012).
[12]
J. Epstein, A. P. Black, and S. Peyton-Jones. "Towards Haskell in the cloud." In ACM SIGPLAN Notices, vol. 46, no. 12, pp. 118--129. ACM, 2011.
[13]
G. Guthrie. (2014, January 1). "Your transpiler to JavaScript toolbox". Retrieved March 1, 2014, from http://luvv.ie/2014/01/21/your-transpilerto-javascript-toolbox/.
[14]
D. Hedin, A. Birgisson, L. Bello, and A. Sabelfeld. "JSFlow: Tracking information flow in JavaScript and its APIs." In Proc. 29th ACM Symposium on Applied Computing. 2014.
[15]
P. Lubbers and F. Greco. "Html5 web sockets: A quantum leap in scalability for the web." SOA World Magazine (2010).
[16]
S. Marlow, and S. Peyton Jones. "Making a fast curry: push/enter vs. eval/apply for higher-order languages." In ACM SIGPLAN Notices, vol. 39, no. 9, pp. 4--15. ACM, 2004.
[17]
V. Nazarov. "GHCJS Haskell to JavaScript Compiler". Retrieved March 1, 2014, from https://github.com/ghcjs/ghcjs.
[18]
The Opa framework for JavaScript. Retrieved May 2, 2014, from http://opalang.org.
[19]
T. Petricek, and Don Syme. "AFAX: Rich client/server web applications in F#." (2007).
[20]
S. Peyton Jones. "Implementing lazy functional languages on stock hardware: the Spineless Tagless G-machine." J. Funct. Program. 2, no. 2 (1992): 127--202.
[21]
S. Peyton Jones. "Tackling the awkward squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell." Engineering theories of software construction 180 (2001): 47--96.
[22]
A. Pignotti. (2013, October 31). "Duetto: a C++ compiler for the Web going beyond emscripten and node.js". Retrieved March 1, 2014, from http://leaningtech.com/duetto/blog/2013/10/31/Duetto-Released/.
[23]
M. Serrano, E. Gallesio, and F. Loitsch. "Hop: a language for programming the web 2. 0." OOPSLA Companion. 2006.
[24]
B. Stroustrup. (2014, January 21). "C++11 - the new ISO C++ standard." Retrieved March 1, 2014, from http://www.stroustrup.com/C++11FAQ.html.
[25]
C. Taylor. (2013, March 1). "Polyvariadic Functions and Printf". Retrieved March 1, 2014, from http://christaylor.github.io/blog/2013/03/01/how-Haskell-printf-works/.
[26]
S. Wargolet. "GoogleWeb Toolkit. Technical report 12." University of Wisconsin-Platterville Department of Computer Science and Software Engineering, 2011.

Cited By

View all
  • (2022)Could Tierless Languages Reduce IoT Development Grief?ACM Transactions on Internet of Things10.1145/35729014:1(1-35)Online publication date: 30-Nov-2022
  • (2016)Eliom: A Core ML Language for Tierless Web ProgrammingProgramming Languages and Systems10.1007/978-3-319-47958-3_20(377-397)Online publication date: 9-Oct-2016
  • (2015)Foreign exchange at low, low rates a lightweight FFI for web-targeting Haskell dialectsProceedings of the 27th Symposium on the Implementation and Application of Functional Programming Languages10.1145/2897336.2897338(1-13)Online publication date: 14-Sep-2015
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 49, Issue 12
Haskell '14
December 2014
141 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/2775050
  • Editor:
  • Andy Gill
Issue’s Table of Contents
  • cover image ACM Conferences
    Haskell '14: Proceedings of the 2014 ACM SIGPLAN symposium on Haskell
    September 2014
    154 pages
    ISBN:9781450330411
    DOI:10.1145/2633357
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 03 September 2014
Published in SIGPLAN Volume 49, Issue 12

Check for updates

Author Tags

  1. distributed systems
  2. network communication
  3. web applications

Qualifiers

  • Research-article

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)12
  • Downloads (Last 6 weeks)0
Reflects downloads up to 08 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2022)Could Tierless Languages Reduce IoT Development Grief?ACM Transactions on Internet of Things10.1145/35729014:1(1-35)Online publication date: 30-Nov-2022
  • (2016)Eliom: A Core ML Language for Tierless Web ProgrammingProgramming Languages and Systems10.1007/978-3-319-47958-3_20(377-397)Online publication date: 9-Oct-2016
  • (2015)Foreign exchange at low, low rates a lightweight FFI for web-targeting Haskell dialectsProceedings of the 27th Symposium on the Implementation and Application of Functional Programming Languages10.1145/2897336.2897338(1-13)Online publication date: 14-Sep-2015
  • (2024)Welcome to the Parti(tioning) (Functional Pearl): Using Rewrite Rules and Specialisation to Partition Haskell ProgramsProceedings of the 17th ACM SIGPLAN International Haskell Symposium10.1145/3677999.3678276(27-40)Online publication date: 29-Aug-2024
  • (2023)HasTEE: Programming Trusted Execution Environments with HaskellProceedings of the 16th ACM SIGPLAN International Haskell Symposium10.1145/3609026.3609731(72-88)Online publication date: 30-Aug-2023
  • (2021)Lightweight Declarative Server-Side Web ProgrammingPractical Aspects of Declarative Languages10.1007/978-3-030-67438-0_7(107-123)Online publication date: 13-Jan-2021
  • (2020)A Survey of Multitier ProgrammingACM Computing Surveys10.1145/339749553:4(1-35)Online publication date: 26-Sep-2020
  • (2018)Scalagna 0.1: towards multi-tier programming with Scala and Scala.jsCompanion Proceedings of the 2nd International Conference on the Art, Science, and Engineering of Programming10.1145/3191697.3191731(69-74)Online publication date: 9-Apr-2018
  • (2018)Tierless Web Programming in the LargeCompanion Proceedings of the The Web Conference 201810.1145/3184558.3185953(681-689)Online publication date: 23-Apr-2018
  • (2017)A meta-EDSL for distributed web applicationsACM SIGPLAN Notices10.1145/3156695.312296952:10(75-85)Online publication date: 7-Sep-2017
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media