Just a side-note: WebSharper's *server-side HTML language* (IntelliFactory.Html.*) and the surrounding abstraction for "sites as F# values" are called sitelets, and they are described, arguably in a page that needs many more details, at:
Sitelets offer a flexible and robust solution to describing client-server applications and come with what we call dynamic templating, e.g. binding to HTML templates with typed placeholders, and instantiating those at runtime. (WebSharper also supported static templating, where HTML template files were translated to F# code at compile time and used with the rest of the application, but this was removed - see below.) This templating can also be used in client-only applications (without an RPC-based backend). This particular form of applications can be represented in two main ways:
* As "offline" sitelets - which generate a full HTML/JS application from an F# sitelet. One way to create such a sitelet is via the "Sitelet Html Application" Visual Studio template shipped with WebSharper.
* As a "bundle" application - which enhance an existing HTML base page with dynamic functionality via generated JS and carefully selected entry points.
Pagelets in turn are a mechanism to represent client-side dynamic content and functionality and they use the *client-side HTML language* (IntelliFactory.WebSharper.Html.*).
The latest WebSharper UI library, UI.Next, is a fundamentally different approach to both sitelets and pagelets, and adds reactivity to the mix - enabling to express reactive DOM along with their corresponding model. UI.Next calls these reactive fragments "documents" and they may very well become the standard HTML language for WebSharper 3.0 for both client and server HTML. UI.Next documents can encode SPAs, and even some of the capabilities of sitelets (routing, etc.) in a client-side formalism.
We recently started experimenting with adding type providers to bind to external HTML templates for UI.Next consumption, you can find a basic but largely untested approach in the latest Nuget release for UI.Next. You can expect additional type provider-based capabilities in future releases.
Cheers,
Adam.