skip to main content
research-article

Experience report: ocsigen, a web programming framework

Published:31 August 2009Publication History
Skip Abstract Section

Abstract

The evolution of Web sites towards very dynamic applications makes it necessary to reconsider current Web programming technologies. We believe that Web development would benefit greatly from more abstract paradigms and that a more semantical approach would result in huge gains in expressiveness. In particular, functional programming provides a really elegant solution to some important Web interaction problems, but few frameworks take advantage of it.

The Ocsigen project is an attempt to provide global solutions to these needs. We present our experience in designing this general framework for Web programming, written in Objective Caml. It provides a fully featured Web server and a framework for programming Web applications, with the aim of improving expressiveness and safety. This is done by taking advantage of functional programming and static typing as much as possible.

Skip Supplemental Material Section

Supplemental Material

experiencereportocsigenawebprogrammingframeworkonvimeo.mp4

References

  1. Vincent Balat. Ocsigen: Typing Web interaction with Objective Caml. In International Workshop on ML, pages 84--94. ACM Press, 2006. ISBN 1-59593-483-9. doi: http://doi.acm.org/10.1145/1159876.1159889. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Vincent Balat. Eliom programmer's guide. Technical report, Laboratoire PPS, CNRS, université Paris-Diderot, 2007. URL http://ocsigen.org/eliom.Google ScholarGoogle Scholar
  3. Véronique Benzaken, Giuseppe Castagna, and Alain Frisch. CDuce: An XML-centric general-purpose language. In ACM SIGPLAN International Conference on Functional Programming (ICFP), Uppsala, Sweden, pages 51--63, 2003. ISBN 1-58113-756-7. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Benjamin Canou, Vincent Balat, and Emmanuel Chailloux. O'browser: Objective Caml on browsers. In ML '08: Proceedings of the 2008 ACM SIGPLAN workshop on ML, pages 69--78, New York, NY, USA, 2008. ACM. ISBN 978-1-60558-062-3. doi: http://doi.acm.org/10.1145/1411304.1411315. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Ezra Cooper, Sam Lindley, Philip Wadler, and Jeremy Yallop. Links: Web programming without tiers. In FMCO 2006, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Olivier Danvy. Functional unparsing. Journal of Functional Programming, 8(6):621--625, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Stéphane Ducasse, Adrian Lienhard, and Lukas Renggli. Seaside -- a multiple control flow web application framework. In Proceedings of ESUG Research Track 2004, pages 231--257, 2004.Google ScholarGoogle Scholar
  8. R. Fielding, J. Gettys, J. Mogul, H. Frystyk, L. Masinter, P. Leach, and T. Berners-Lee. Hypertext transfer protocol -- HTTP/1.1, 1999. URL http://www.ietf.org/rfc/rfc2616.txt.Google ScholarGoogle Scholar
  9. Alain Frisch. OCaml + XDuce. In International conference on Functional programming (ICFP), pages 192--200, New York, NY, USA, 2006. ACM. doi: http://doi.acm.org/10.1145/1160074.1159829. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Paul Graham. Beating the averages, 2001. URL http://www.paulgraham.com/avg.html.Google ScholarGoogle Scholar
  11. John Hughes. Generalising monads to arrows. Science of Computer Programming, 37(1--3):67--111, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Shriram Krishnamurthi, Peter Walton Hopkins, Jay Mccarthy, Paul T. Graunke, Greg Pettyjohn, and Matthias Felleisen. Implementation and use of the PLT Scheme Web server. In Higher-Order and Symbolic Computation, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Daan Leijen and Erik Meijer. Domain specific embedded compilers. In Domain-Specific Languages, pages 109--122, 1999. URL citeseer.ist.psu.edu/leijen99domain.html. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Xavier Leroy, Damien Doligez, Jacques Garrigue, Jérôme Vouillon, and Dider Rémy. The Objective Caml system. Software and documentation available on the Web, 2008. URL http://caml.inria.fr/.Google ScholarGoogle Scholar
  15. Mark Nottingham and Robert Sayre. The Atom Syndication Format. RFC 4287, December 2005.Google ScholarGoogle Scholar
  16. Francois Pottier and Yann Régis-Gianas. Stratified type inference for generalized algebraic data types. In Proceedings of the 33rd ACM Symposium on Principles of Programming Languages (POPL'06), pages 232--244, Charleston, South Carolina, January 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Christian Queinnec. The influence of browsers on evaluators or, continuations to program web servers. In International conference on Functional programming (ICFP), pages 23--33, Montreal (Canada), September 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Christoph Sauer, Chuck Smith, and Tomas Benz. Wikicreole: a common wiki markup. In WikiSym '07: Proceedings of the 2007 international symposium on Wikis, pages 131--142, New York, NY, USA, 2007. ACM. ISBN 978-1-59593-861-9. doi: http://doi.acm.org/10.1145/1296951.1296966. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Manuel Serrano, Erick Gallesio, and Florian Loitsch. Hop, a language for programming the Web 2.0. In Dynamic Languages Symposium, October 2006.Google ScholarGoogle Scholar
  20. Peter Thiemann. Wash/CGI: Server-side Web scripting with sessions and typed, compositional forms. In PADL '02, January 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Phil Trinder. Comprehensions, a query notation for DBPLs. In DBPL3: Proceedings of the third international workshop on Database programming languages : bulk types&persistent data, pages 55--68, San Francisco, CA, USA, 1992. Morgan Kaufmann Publishers Inc. ISBN 1-55860-242-9. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Jérôme Vouillon. Lwt: a cooperative thread library. In ML '08: Proceedings of the 2008 ACM SIGPLAN workshop on ML, pages 3--12, New York, NY, USA, 2008. ACM. ISBN 978-1-60558-062-3. doi: http://doi.acm.org/10.1145/1411304.1411307. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Hongwei Xi, Chiyan Chen, and Gang Chen. Guarded recursive datatype constructors. In Proceedings of the 30th ACM SIGPLAN Symposium on Principles of Programming Languages, pages 224--235, New Orleans, January 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Experience report: ocsigen, a web programming framework

        Recommendations

        Reviews

        Dorothy Bollman

        The open-source Ocsigen project provides tools for developing and running Web applications. Its Web server is written in Objective Caml (OCaml). Eliom, an extension to the server, provides a high-level application programming interface (API) for programming dynamic Web sites with OCaml. Balat, Vouillon, and Yakobowski give an overview of the Ocsigen project and argue strongly in favor of using functional languages such as Caml for Web programming. They claim that the use of such languages "offers a solution to the statelessness of the HTTP protocol" and "results in huge gains in expressiveness." Many people in the general programming community shun the use of functional languages, regarding them as too abstract and therefore inappropriate for "real" programming. Perhaps for the same reason, functional programming has not yet gained acceptance in the Web development community, despite the advantages described by the authors. Online Computing Reviews Service

        Access critical reviews of Computing literature here

        Become a reviewer for Computing Reviews.

        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 44, Issue 9
          ICFP '09
          September 2009
          343 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1631687
          Issue’s Table of Contents
          • cover image ACM Conferences
            ICFP '09: Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
            August 2009
            364 pages
            ISBN:9781605583327
            DOI:10.1145/1596550

          Copyright © 2009 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 31 August 2009

          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!