From Java 7 to Functional Programming
summary
Migrates a Java 7 web application to a functional style using Java 8 features and the Vavr library, adding immutability, Option/Try, pattern matching, flatMap, and reduce to remove boilerplate. Keeps the same REST API and JPA backend while demonstrating step‑by‑step refactorings, Spring and Jackson integration, conversion techniques, and cases where performance or library limits matter, with live demos showing a ~30–50% LOC reduction and compatible behavior (including changing a response to 404 via pattern matching).
AI-written summary · about
chapters (21)
- 0:00Java 7 to functional metaphor
- 2:27Introduction
- 3:09Functional Java with Vavr
- 3:50Lambda functions in Java
- 7:25Method references and math
- 9:53Immutable Vavr collections
- 11:57Option in functional programming
- 15:48Either type and error handling
- 18:21Pattern matching with Vavr
- 21:31Vavr with Spring and Jackson
- 21:55Live coding: functional migration
- 23:40Migrating User model
- 27:39Migrating repositories
- 27:59Migrating controllers
- 33:18FlatMap API migration
- 38:01Migrating seed data
- 39:26Validating migration results
- 40:30HTTP errors with pattern matching
- 44:23Vavr benefits and feedback
- 47:52Adopting functional Java
- 48:13Q&A
related talks
36mHow functional programming change my Java code
37mPragmatic Functional Refactoring with Java 8
39mFunctional Centered Design
51mFunctional Programming with Java
43mRefactoring to Functional Style
48mEmbrace the Func - How Far has Functional Programming Come in Java?
29mLet's get functional
55mFunctional Programming Patterns with Java8
