Download  |  Documentation  |  Bugs  |  About

SMLserver is a Web server plugin for the Apache Web server. SMLserver makes it possible to write dynamic Web applications using your favorite programming language without sacrificing efficiency and scalability of your Web service. SMLserver includes the possibility of accessing a variety of different relational database management systems (RDBMSs), such as Oracle and Postgresql.

Main Features of SMLserver

Standard ML '97 The Definition of Standard ML SMLserver supports all of Standard ML '97, as defined in the Definition of Standard ML. In particular, SMLserver supports the use of Standard ML Modules and most of the Standard ML Basis Library. SMLserver is based on the MLKit.
Web Server API SMLserver provides an SML interface to much of the Apache API, thereby giving the SML programmer access to the following features:
  • Easy access to form data and request header information, including cookies
  • Access to Relational Database Management Systems (RDBMSs) through an efficient generic interface that supports database pooling (i.e, reuse of database connections). Supported RDBMSs include Oracle, Postgresql, and MySql.
  • Support for sending email
  • Support for extracting data from foreign Web sites
  • Caching possibilities for improved efficiency
  • XML-RPC client and server support
Efficient Multi-threaded Execution SMLserver compiles Standard ML programs into bytecode files, which are loaded only once but may be executed many times upon client requests. A multi-threaded execution model makes it possible for SMLserver to serve multiple requests simultaneously.
Documentation buy this book on Lulu. A tutorial book on writing dynamic Web applications using SMLserver is available for download from the documentation page and in print as a Lulu book.

Other Features

Open Source License SMLserver is Open Source; it is distributed under the GNU General Public License (GPL) and hosted by the IT University of Copenhagen, Denmark.
ML Server Pages SMLserver supports the execution of dynamic Web pages written using ML Server Pages (MSP). A dedicated tool mspcomp compiles .msp-files into .sml-files with appropriate calls to the Apache API.
Quotations Built-in support for quotations in the MLKit makes for an elegant way of embedding HTML and SQL in your Standard ML Web applications.
Binary Distribution A binary distribution is available as tgz and deb packages for Debian and Linux systems from the download page. Source code distributions are also available.
If you like it... If you make use of SMLserver, we provide a few logos, which you can include on your Web pages, if you like (Using the logos is not a requirement, of course.)
2011-05-25: SMLtoJs is now hosted at

2007-04-12: SMLserver version 4.3.2 is available for download.

2007-04-12: Read the tutorial SMLserver - a Functional Approach to Web Publishing (Second Edition).

2004-06-19: Martin Elsman gave a talk at PADL'04 on Typing XHTML Web Applications in ML.

2003-01-14: Niels Hallenberg gave a talk at PADL'03 on Web Programming with SMLserver.

SMLserver Examples
program sources
Count up and down1
Temperature conversion1, 2
Dynamic recipe1, 2
Guess with Bill1
Form variables1, 2
Server information1
Caching support1, 2, 3
Currency exchange1
Currency service1, 2
Send an email1, 2
Guest book (DB)1, 2
Employee search (DB)1, 2, 3
Best Wines (DB)1, 2, 3, 4, 5
Link database (DB)1, 2, 3, 4
Cookie example1, 2, 3
Hello world (MSP)1
Multiplication (MSP)1
Calendars (MSP)1
Tables (MSP)1
XMLrpc client/server1, 2

The above examples are all part of the distribution; most of the examples are described in the book SMLserver - a Functional Approach to Web Publishing (Second Edition).

webmaster at   Powered by SMLserver