Please log in to watch this conference skillscast.
Type-driven development is a programming style where you write types first and use them to guide the definition of functions in your program. Scala is particularly well suited to it because of its powerful type system. Cats lets you take Scala and type-driven development even further by expressing side effecting operations as types.
During this talk, you will learn how to create a web service using Akka HTTP and Cats' Free, IO, Writer and Reader monads. The aim is to clearly delimit pure and impure code such that the former can be unit tested and reasoned about whilst the latter can be minimized.
The talk will have three parts. The first will show how to 'free' an Algebraic Data Type (ADT) that describes side effecting operations using the Free monad and an interpreter. The second part will introduce the IO monad and demonstrate how it lets you be both lazy and explicit when dealing with asynchronous operations. And in the final part, we will explore how to use the Reader and Writer monads to read configuration and write logs without sacrificing purity.
YOU MAY ALSO LIKE:
- Reactive in practice: web services with Scala and AWS (SkillsCast recorded in December 2015)
- Jenny Martin's BDD From Start to Finish - Successful Delivery through Continuous Collaboration (in London on 4th - 6th November 2019)
- Lightbend Akka for Scala - Professional (in London on 11th - 12th November 2019)
- Scala eXchange London 2019 (in London on 12th - 13th December 2019)
- Scalax2gether Community Day 2019 (in London on 14th December 2019)
- Code Kata: Yilin Wei - Optics with Monocle (in London on 22nd October 2019)
- Don’t keep it to yourself - openness and honesty in the workplace (in London on 30th October 2019)
- Higher-Order Type-Level Programming (SkillsCast recorded in October 2019)
- Stick to Simple Haskell (SkillsCast recorded in October 2019)
Type-Driven Development in Practice: Cats and Akka HTTP
Matt Roberts is a Lead Consultant at a Disney Streaming Services. Engineering web-scale software using Scala, AWS and FP with the help of awesome people. Matt has used Scala since 2.8 and enjoys using the type system and functional concepts to make great software.