Guide - Web Programming with F#

F# excels at building efficient, scalable and robust web solutions. Web programming is
based around receiving a single HTTP request and replying with a result, which maps very
well to a stateless, functional approach. Advantages to using F# for web programming include:

To contribute to this guide, log on to GitHub, edit this page and send a pull request.

The resources below are listed for educational purposes related to the F# programming language. Mention of commercial products, processes, or services should not be construed as an endorsement or recommendation.

Web Frameworks

Suave

Suave is a simple web development F# library providing a lightweight web server and a set of combinators to manipulate route flow and task composition.

Fable

Fable is an F# to JS compiler designed to generate clean
and standard code in order to maximize interoperability in both ways. It integrates with most
of JS development pipelines like Babel, Webpack
or React Hot Loader. Fable allows you to develop
node.js services, desktop apps with Electron
and mobile apps with React native.

ASP.NET Core

ASP.NET Core is a modern, cross-platform, high-performance, open-source framework for building modern, cloud-based, Internet-connected applications. It runs on .NET Core and supports F# out of the box. If you install the .NET Core SDK, there are F# templates available via the dotnet new command.

Giraffe

Giraffe is an F# micro web framework for building rich web applications. It has been heavily inspired and is similar to Suave, but has been specifically designed with ASP.NET Core in mind and can be plugged into the ASP.NET Core pipeline via middleware.

OWIN and Katana provide a flexible set of components for building and hosting Open Web Interface for .NET (OWIN)-based web applications. Web API can be hosted directly on Katana using the Owin Web API package.

Freya

Freya provides a functional web stack built on top of OWIN. At its core, Freya wraps the OWIN environment dictionary with a computation expression and provides access to that dictionary with lenses. Additional layers of the stack provide types based on the HTTP and related RFCs, a pipeline abstraction for connecting Freya computations, a router, and an implementation of the HTTP finite state machine, like that found in webmachine.

Frank

SignalR

SignalR provides bi-directional communication between web servers and clients using one of several mechanisms, beginning with web sockets and falling back through several other approaches depending on client and server capabilities.
One example is a Web Application Server (F#).

The resources listed on this page are provided for educational purposes related to the F# programming language. The F# Software Foundation does not endorse or recommend any specific commercial products, processes, or services.