In this talk, we will join Markus Hauck into the land of functional web services using final encodings. We will see what a final encoding is and how to write embedded DSLs in this style. After that we can implement a web service using a DSL written in the final encoding and compare that with the normal OO-heavy style.
The talk will show the so called „final encoding“ technique that is somehow related to free monads, but as been overlooked for some time now. They also allow an embedded DSL that can be „interpreted“ differently according to your mood, but compose more natural than coproducts and free monads. I want to show in this presentation a way to write a whole web service using for example http4s or akka-http in this style and how nice it is for testing stuff by swapping out interpreters. I hope that the talk can cover both beginner topics (how to write web services in a more functional style) as well as a little advanced ground (how to write your final encoding).