Your first Haskell web app with WAI and Warp

location_city Bengaluru schedule Nov 15th 11:00 - 11:45 AM place Ball Room 2 people 82 Interested

Haskell's Web Application Interface (WAI- pronounced "why") provides an abstraction between web applications and web servers. This allows many different web frameworks (e.g., Yesod, Spock, and Servant) to share servers like Warp and middlewares.

Haskell's web frameworks offer a wide variety of feature sets, type-level and metaprogramming, and intended use cases. And for most use cases, I would recommend using an existing web framework, which will help you avoid common pitfalls and more quickly address common use cases.

But not today! In this tutorial, we're going to step through building a functioning web server using just the bare-bones WAI interface and Warp as a server. Familiarity with the basics of Haskell will be a plus, but this will be a talk open to all FP and Haskell skill levels.

 
 

Outline/Structure of the Tutorial

[Slides available online](https://www.snoyman.com/reveal/first-app-wai-warp)

  • Describe WAI's goals
  • Explain the core data types
  • Discuss the three core concepts: application, handler, and middleware
  • Our first web app
  • Using Request information
  • Different Response types
  • Applying some middlewares
  • How to deploy

Learning Outcome

Familiarity with the core of the WAI ecosystem, with the ability to either continue using WAI for building web apps or, as recommended, jump into a web framework.

Target Audience

People interested in learning how to do applied web development in a functional language like Haskell.

Prerequisites for Attendees

Familiarity with how web services work and the basics of Haskell syntax.

schedule Submitted 7 months ago