Eliom's Homepage

Eliom is a framework for programming web sites and client/server web applications. It uses very new concepts making programming very different from all other web programming tools, and allowing to write a complex web site in very few lines of code.

2012-12 Eliom 3.0 is out!

we are celebrating Ada's birthday by bringing out a major update of Eliom - the advanced framework for client/server web applications in OCaml - and some minor updates for Ocsigen Server and Tyxml.

Here is a list of major new features (and short code snippets can be found at the end of this announcement):

  • The tightest integration of client value within the server code ever made possible in a major statically typed programming language [1]
  • Easy access to top-level server values - and (Lwt-)functions - from within the client code [2]
  • Access to other users' states of Eliom references
  • Improved support of Eliom's source files in the compilation tools eliom{c,opt,dep}
  • A new tool, eliom-destillery, for creating basic projects fast & easy

The manual, a cheat-sheet, a comprehensive tutorial, and the API-documentation of the various Ocsigen projects are available on

The probably simplest and most generic way to install Eliom is by using OPAM. But also Debian packages are already available (in experimental, thanks Stéphane!), Gentoo-ebuilds are on their way, the Ocsigen-bundle is still at hand, and the archives can be found at

And maybe you may want to become social with us on

Enjoy!

– The Ocsigen-team

[1]
{server{ (* This marks server-side code *)

  let value_history_on_client =
    {ref string{ ref [] }} (* A client value within the server code *)

  let _ = My_app.register_service ~path ~get_params
    (fun value () ->
      (* Push the GET parameter to the client's history a side effect *)
      ignore {unit{
        %value_history_on_client := %value :: ! %value_history_on_client
      }};
      Lwt.return html)

}}

[2]
{server{

  let f = server_function Json.t<string>
    (fun x -> Printf.eprintf "Client says: %s\r\n%!" x; Lwt.return ())

}}

{client{ (* This marks client-side code *)

  (* %f makes the server's value f, a client-ready server function,
     available in the client code *)
  ... %f "hello!" ...

}}

Demos

Features

  • Integrated client and server side programming with automatic bidirectional communication
  • Mixes traditional Web interaction with very dynamic client side features
  • Dynamic creation of services
  • Static checking of HTML
  • Automatic management of sessions
  • Concise and modular programming

Other projects

Read also the Ocsigen tutorial ...