F# is excellent for building scalable, robust web solutions:
WebSharper allows end-to-end web applications with both client and server developed in F#. It includes TypeScript interoperability, mobile web apps, getting started material, templates and much more.
NancyFx is a lightweight, low-ceremony, framework for building HTTP based services on .NET and Mono. F# templates are available.
Web API 2.0 is a widely used open source web framework from Microsoft. The Pure F# Web Templates (Visual Studio, Web API 2.0). These templates provide a Pure F# project for implementing a web API with Web API 2.0. Everything is implemented in F#.
Some resources on using F# with Web API:
F#/C# Web Templates for REST - (Visual Studio, ASP.NET Web API) Includes templates for ASP.NET Web API.
ServiceStack is is a framework for simple and fast web services on .NET and Mono.
F# and ServiceStack Example 1 - Web Services on any platform in and out of a web server! An async+parallel cached twitter proxy that works cross platform on Windows/OSX and Linux in 100 LOC
F# and ServiceStack Example 2 - An Async, Cached Twitter API Proxy in F#
F#, ServiceStack and Heroku - Using ServiceStack and Heroku with F#
Serving Requests with IHttpHandlers
Do it the simple way, and serve web requests direct from code using F# asynchronous programming.
Making WSDL Services
Common hosting options are:
The Cloud Programming section contains more details on cloud programming with F#. Some specific resources related to web programming are:
It is common to create a suite of unit tests when building web solutions. A list of open source libraries that assist with unit testing is available here:
Here are a few Visual Studio 2012 project templates available for building unit tests:
Several books have been written that include information on building web applications with F#:
There are several presentations and tutorials available that include information on build web applications with F#:
When using MVC ASP.NET 3 or 4, mixed C#/F# ASP.NET MVC are used. In this approach, views are implemented in HTML with some C#. Models and controllers are implemented in F#.
* The F#/C# Web Templates (Visual Studio, ASP.NET MVC 4)
include templates for ASP.NET MVC 4 (ASPX/Razor) and Single Page Applications with Backbone.js or Knockout.js.
* The F#/C# Web Templates (Xamarin Studio, ASP.NET MVC 4) are a similar set of cross-platform templates for MonoDevelop.
* The F#/C# Web Templates (Visual Studio, ASP.NET MVC 3 include templates for ASP.NET MVC 3 (ASPX/Razor).
For those still using Silverlight, you can use F# to build Silverlight projects in whole or in part. Some resources are: