Functional programming is an increasingly popular approach to writing and thinking about code. Is it also applicable to such daily programming tasks as accessing a relational database? Is it possible to work with transactions in a "functional" way? Yes! But what does it mean in practice? And is this any better than using JPA's or Spring's @Transactional?
In this live-coding session, we'll try to answer these questions, and demonstrate how the "functional" approach improves over the "traditional" one in three areas: working with multi-thread code, requiring a framework and precisely delimiting transaction boundaries.
We'll be focusing on one specific problem area, however the techniques that we'll use have broader applicability, and are often used to solve other problems as well.