Suave.IO introduction and example - Part 1: Intro

Suave.IO introduction and example - Part 1: Intro

-

Back in May I attended the NCrafts Conference in Paris where I was able to participate in a Suave.IO workshop and get some practical hands-on time with Suave.

After I got back home I decided to take it for a spin and write an actual application, which resulted in the NDC Tracker, which you can read about here.

It was my plan to write a blog post about my experience writing the tracker using Suave, but I ended up with too much material for a single post, and I also found myself having a ton of questions about Suave that I felt needed answering.

I ended up writing this series of blog posts, which is both an account of my initial experience with Suave, as well as an attempt to answer some questions I was asking myself while putting together a Suave application that was a little more than just a "Hello World" example.

Disclaimer: As you have probably gathered from the intro above I am far from a Suave.IO expert, but rather a curious novice. I will do my best to update the posts with both new information and improvements as I learn. Don't hesitate to get in touch if you have suggestions or corrections!

Why Suave?

There are a couple of reasons that I am interested in Suave. First of all I am interested in ways to create lightweight .NET web applications, and I think Suave might be a good fit for doing that. Furthermore I find myself moving towards F#, and like the idea of writing web applications in F# without feeling like I need to hack things together or apply workarounds to do so.

The structure

Rather than writing a long monolithic piece I've tried to divide the content into a series of posts each dealing with a subject I dealt with while writing my first Suave application. The subjects are as follows.

  1. Intro - What you are reading right now
  2. Setting up a project - Setting up a Suave.IO project and getting it running locally
  3. Requests and routing - How to serve content
  4. Database access - Moving on from the static website
  5. Deploying to Azure - How to get your application running as a Web App

Example application

We need an example application to expand on as we move through the different posts. I feel the NDC Tracker ended up being a little too frontend focused to really be suitable as a Suave.IO example. So rather than that we will be writing a tiny run-of-the-mill todo app.

The example code is available in the suave-todo at GitHub.

Let's get started

That was the introduction out of the way, let's move on to Part 2 - Setting up a project.

View Comments