Jobs

Developers

WebSharper Warp is a friction-less web development library for building scripted and standalone full-stack F# client-server applications. Warp is built on top of WebSharper and is designed to help you become more productive and benefit from the rich WebSharper features more quickly and more directly. While Warp shorthands target the most typical applications (text, SPAs, multi-page) and easy exploration, you can extend your Warp applications with the full WebSharper capabilities at any time.

Installing

To get started with Warp is super-easy, all you need is to open a new F# Console Application (or any other F# project type if you want to script applications), and add WebSharper.Warp to it:

Single Page Applications

While serving text is fun and often useful, going beyond isn't any complicated. Warp also helps constructing HTML. In the most basic form, you can create single page applications (SPAs) using Warp.CreateSPA and WebSharper's server-side HTML combinators:

Multi-page applications

Using multiple EndPoints and Warp.CreateApplication, you can define multi-page Warp applications. When constructing the actual pages, Warp.Page comes handy - allowing you to fill the Title, Head, and the Body parts on demand. Warp.Page pages are fully autonomous and will automatically contain the dependencies of any client-side code used on the page.

Adding client-side functionality

Warp applications can easily incorporate client-side content and functionality, giving an absolute edge over any web development library. The example below is reimplemented from Deploying WebSharper apps to Azure via GitHub, and although it omits the more advanced templating in that approach (which is straightforward to add to this implementation), it greatly simplifies constructing and running the application.

Getting help

From looking at the source (which is really quite short, less than 250 lines including whitespace and comments), this looks like a thin wrapper around sitelets to make theem easier to use. Which is great, since Warp-based applications can integrate with things you need plain sitelets for (like REST APIs) really easily.

Adam, ya'll already won me over from the OOP camp with F# before seeing this. When I saw the language, it was when a sr developer who showed me how to write a parser to slice through a clobbered YAML file that Ruby's Nokogiri gem choked on.

I didn't come from a computer science or web designer background, either. But I do have a 4 year in pure (i.e. not applied) math, so I think (and code) like a mathematician. I know that there is no programming language that is the "magic bullet" of magic bullets, but if given a choice, I would use F# for most applications that entail data association modeling.

In fact, since being turned on to F# a few months ago, and being VERY impressed with it before even seeing this WebSharper tool, I made a deliberate decision to use F# for a data-rich project I am bootstrapping.

On final word: I am a self-taught programmer that comes from a very disadvantaged background. I am teaching myself F#. Are you familiar with the saying, "If you build it, they will come?" Well..because someone built F# and behold, I came :)

I eventually would like to learn Haskell and R too. I mean, Ruby on Rails was sorta neat in a bells and whistles kind of way. That's where I started learning programming as an older woman 2 years ago. PHP is its own kind of frustrating hell. But F# hit my coding "g-spot", if you get me. (Sorry for the TMI)

You know what, I just modified Adam's excellent demo by adding a Contact Us page, and also adding a paragraph of text explaining to Rubyists that they should think of the DU code block, "type EndPoints", as the F# equivalent of Rails' routes.

For those using Paket, I just carried over a couple bits from Loic's commit
to the Warp README about how to
install Warp with Paket into your projects, and how you can just include
a single file when running scripted apps via Paket.

Sounds like you are trying to use the client-side HTML language (from WebSharper.Html.Client) instead of the server-side one in your CreateSPA function. The snippets in the blog entry are "incremental", so the full code looks like this: