Real World Haskell

Real World Haskell

A lot of people think day-to-day tasks like running a web app are difficult or impossible in Haskell! But of course this isn't true! In our Real World Haskell series, we'll take you through a whole slew of libraries that allow you to write a web backend. These libraries use Haskell's features to approach things like database queries and API building in unique ways.

Part 1: Databases and Persistent

In part 1 of this series, we'll use the Persistent library and Template Haskell to create a simple database schema. This will enable us to run migrations with ease. It will also allow us to write some simple type safe SQL queries!

Part 2: Servant and Web Servers

Once we have our database set up, we'll want to serve the information we're storing over a web API. We'll do this with the Servant library. Servant allows us to build endpoints that retrieve their query parameters in a type-safe way! Find out how in part 2 of the series!

Part 3: Redis and Caching

Now that we have our API set up, we'll see how we can make it faster by adding a Redis cache! We'll learn how to use the Redis bindings for Haskell so we can avoid using the database for some of our queries! See how it all works in part 3.

Part 4: Testing with Docker

Our end-to-end system is now quite complicated, so testing it is difficult for a variety of reasons. In part 4, we'll see some techinques to test our web API. We'll also use Docker to make this process easier.

Part 5: Esqueleto and Complex Queries

In the final part of our Real World Haskell series, we'll learn some more about advanced SQL queries. We'll extend our schema and use the Esqueleto library to perform type safe joins between our different data types!

Review: Production Checklist

This series goes over some cool libraries, but there's still so much more to explore! Check out our Production Checklist and explore a ton of other libraries you can use for various tasks when making a production system in Haskell!