This is the programmer's guide for Eliom (version 1.3). Please report any error in this tutorial and send us your comments and suggestions!

Eliom is an extension for the Web server Ocsigen that allows dynamic webpages generation. It uses very new concepts making programming very different from all other Web programming tools. It allows to write a complex Web site in very few lines of code.

Warning: This tutorial assumes you know the Objective Caml language.

Table of contents

  • The basics: main services, parameters, forms, cooperative programming
    • Base principles
      • Definition and registration of services
      • compilation
      • configuration file
      • static typing of XHTML with XHTML.M, with OCamlDuce
      • XHTML syntax extension
      • untyped HTML pages
    • More examples
      • Pages with side effects
      • directories
      • default page of a directory
    • Parameters
      • Typed GET parameters
      • suffix parameters
      • user-type parameters
      • untyped parameters
      • catching parameter typing errors
    • Links
      • Internal and external links
      • (mutually) recirsive pages
    • Forms
      • GET forms towards typed services
      • untyped (raw) forms
      • POST parameters
      • services with GET and POST parameters
      • POST forms
    • Threads
      • Examples of pages using cooperative threads
      • detaching computations to preemptive threads
    • The big picture
      • Summary of concepts: main services
      • attached and non-attached coservices
      • list of predefined modules for generating several types of pages : typed xhtml with OCaml or OCamlDuce, untypes pages, files, actions, redirections, etc.
      • public service table and session service table
      • case examples ...
  • Sessions, users and other common situations in Web sites
    • Session data
      • Volatile session data tables
      • setting session data
      • closing sessions
      • example: connection of users
    • Session services
      • Registering private services for a session
      • session service table
      • example: connection of users without session data tables
    • Coservices
      • GET and POST coservices
      • fallbacks
      • non-attached coservices
    • Coservices in session tables
      • Defining dynamically new services for one user
    • Actions
      • Services that do not generate pages
      • actions and non-attached coservices
      • example: connection of users with a login box on each page
    • Details on service registration
  • More details on services and page generation
    • Static parts
      • Fully static pages
      • using Eliom with Staticmod
    • Other kinds of pages
      • Sending portions of pages
      • XMLHttpRequest
      • redirections
      • sending files with Eliom
      • services that decide what they want to send
      • setting cookies
    • Persistence of sessions
      • Updating sites without shutting down the server
      • persistent references
      • persistent association tables
      • persistent session data
      • example: connection of users with persistent sessions
    • Other concepts
      • Pre-applied services
      • Void coservices
      • Giving informations to fallbacks
      • example: connection of users with "Session expired" information
      • disposable coservices
      • timeouts for sessions
      • timeouts for coservices
      • registering coservices in public table during session
      • defining an exception handler for the whole site
      • giving configuration options to your Web sites
      • More about sessions - session names
      • Secure services
      • Secure sessions
      • Non localized parameters
    • Syntax error in extension a_manual
    • Advanced forms and parameters
      • Parsing parameters using regular expressions
      • boolean checkboxes
      • type set
      • <select>
      • clickable images
      • type list
      • forms and suffixes
      • uploading files
    • Predefined constructs
      • Images
      • CSS
      • javascript
      • basic menus
      • hierarchical sites
    • Configuration files
    • Miscellaneous
      • Several Ocaml modules for one site
      • Advanced use: create an extension for the server that access Eliom's data
      • Static linking of Eliom module
    • Examples
      • Writing a forum
      • MiniWiki
  • Writing XHTML
  • Security considerations syntax error in wikisyntax