F# Web Tools Rich client/server web applications in F#

Tomas Petricek, Don Syme

Unpublished draft (2007)

"Ajax" programming is becoming a de-facto standard for certain types of web applications, but unfortunately developing this kind of application is a difficult task. Developers have to deal with problems like a language impedance mismatch, limited execution runtime for the code running in web browser on the client-side and no integration between client and server-side parts that are developed as a two independent applications, but typically form a single and homogenous application.

In this paper we present the first project that deals with all three mentioned problems but which still integrates with existing web development technologies such as ASP.NET on the server and JavaScript on the client. We use the F# language for writing both client and server-side part of the web application, which lets us develop client-side code in a type-safe programming language using a subset of the F# library, and we provide a way to write both server-side and client-side code as a part of single homogeneous module defining the web page logic. This code is executed heterogeneously, part as JavaScript on the client, and part as native code on the server. Finally we use monadic syntax for the separation of client and server-side code, tracking this separation through the F# type system.

Article and more information


This is an unreviewed article, but it still has some good ideas and inspired recent projects such as WebSharper and FunScript, so if you want to cite the article, you can use roughly the following:

  author       = {Petricek, Tomas and Syme, Don},
  title        = {F# Web Tools: Rich client/server web applications in F#},
  howpublished = {Unpublished draft, available online},
  year         = {2007},
  url          = {},

If you have any comments, suggestions or related ideas, I'll be happy to hear from you! Send me an email at or get in touch via Twitter at @tomaspetricek.

Published: Monday, 30 April 2007, 12:00 AM
Author: Tomas Petricek
Typos: Send me a pull request!