The Reflex Architecture (Combo Workshop)
YOW! Lambda Jam 2019 - 14 May
This workshop needs some pre-setup as I'll only have 5 thumbdrives with vms on them. It's around 3GiB to download with virtualbox/docker and about 700MiB with nix: https://github.com/qfpl/reflex-realworld-workshop/blob/master/SETUP.md.
Reflex-dom is a remarkably awesome way to write frontend web applications in Haskell. Reflex DOM is built from Functional Reactive Programming (FRP) primitives defined in a library called Reflex.
Writing apps in reflex-dom is a little weird at first because it's a whole brand new paradigm to structuring your programs. Just like the jump from imperative programming to FP, jumping into FRP is a tricky process of rewiring your brain to fit the new model of thinking. It can be very difficult to appreciate the power and architectures that you can from this transition while you are still learning the basics, which naturally makes it difficult to be motivated to put in the work.
In this workshop we will implement parts of the "real world demo", a demo blogging application designed as a way to test frontend frameworks with things like backend calls and frontend routing. There will be a lot of skeleton and example code already written and be very directed, so it's -- as with the talk -- it is going to be more getting a high level feel than learning all of the fundamentals. It is the hope that the fast paced guided intro will allow you to do the rest of the learning at your own pace later.
Ben has been a fullstack engineer for a bit over a decade: starting off with humble beginnings as a Java and Perl developer. He discovered Scala and Haskell in 2010 via the BFPG and quickly began to realise how much less he had to worry about his functional programs compared to his traditional imperative ones. He has been trying to make his web development as functional as possible ever since: interested in things like Nix, Servant and Obelisk/Reflex-Platform.
Ben currently works remotely for Obsidian Systems, a Software Consulting Firm from New York who specialise in building full-stack Haskell web applications for their clients.
- Target Audience
- Frontend deveopers that feel like another fundamental upgrade is needed. Anyone that wants to live the dream of fullstack haskell apps!
- 1 hour 30min
- You will need a laptop. It's ideal to have an internet connection, but following the guide will mean that you'll do the big downloads before the workshop.
- Follow the instructions here to get a VM, docker image or set it up with nix: https://github.com/qfpl/reflex-realworld-workshop/blob/master/SETUP.md
- You may prohibitively struggle if you aren't used to programming with Functor/Applicative/Monad/Foldable/Traversable/Monoid.
- Having some exposure to mtl type constraints will definitely help.