skip to main content
research-article

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

Published:03 September 2014Publication History
Skip Abstract Section

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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  3. A. Chlipala. "Ur: statically-typed metaprogramming with type-level record computation." ACM Sigplan Notices. Vol. 45. No. 6. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. K. Claessen. "Functional Pearls: A poor man's concurrency monad." Journal of Functional Programming 9 (1999): 313--324. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. The Conductance application server. Retrieved March 1, 2014, from http://conductance.io.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar
  10. C. Done. (2012, September 15). "Fay, JavaScript, etc.", Retrieved March 1, 2014, from http://chrisdone.com/posts/fay.Google ScholarGoogle Scholar
  11. A. Ekblad. "Towards a declarative web." Master of Science Thesis, University of Gothenburg (2012).Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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/.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. P. Lubbers and F. Greco. "Html5 web sockets: A quantum leap in scalability for the web." SOA World Magazine (2010).Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. V. Nazarov. "GHCJS Haskell to JavaScript Compiler". Retrieved March 1, 2014, from https://github.com/ghcjs/ghcjs.Google ScholarGoogle Scholar
  18. The Opa framework for JavaScript. Retrieved May 2, 2014, from http://opalang.org.Google ScholarGoogle Scholar
  19. T. Petricek, and Don Syme. "AFAX: Rich client/server web applications in F#." (2007).Google ScholarGoogle Scholar
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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.Google ScholarGoogle Scholar
  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/.Google ScholarGoogle Scholar
  23. M. Serrano, E. Gallesio, and F. Loitsch. "Hop: a language for programming the web 2. 0." OOPSLA Companion. 2006.Google ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar
  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/.Google ScholarGoogle Scholar
  26. S. Wargolet. "GoogleWeb Toolkit. Technical report 12." University of Wisconsin-Platterville Department of Computer Science and Software Engineering, 2011.Google ScholarGoogle Scholar

Index Terms

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

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            • 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

              Copyright © 2014 ACM

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 3 September 2014

              Check for updates

              Qualifiers

              • research-article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!