Revisiting Design Patterns after 20
summary
Revisits the GoF’s 23 patterns and shows live refactorings that replace boilerplate with Java features: use lambdas and java.util.function instead of custom Strategy interfaces, pass a Function to replace Template Method, model Singleton as an enum, and replace Visitor with sealed classes plus switch expressions and pattern matching so the switch is exhaustive at compile time. Implements a Chain as a record of Predicate+Consumer and composes it via streams, and demos Google Wallet pass examples (full JWT vs precreated JOT); code compiles and runs.
AI-written summary · about
chapters (21)
- 0:00Intro
- 0:48Google Wallet
- 3:29Design Patterns
- 5:31Pattern Language
- 6:53Free Major Principles
- 8:49Code Examples
- 14:58Structure Programming
- 15:18ObjectOriented Programming
- 16:08Encapsulation
- 16:45Single Dispatch
- 24:44Implementing Visitors
- 31:58Legacy Singleton
- 32:28Legacy Chain of Responsibility
- 33:43Interface Notifier
- 34:38Record
- 35:28Alternate Implementation
- 36:08Winning Points
- 37:23Specification
- 38:58String
- 40:38Implementation
- 43:33Raffle
related talks
49mG o F Patterns
51mg ∘ f patterns
55mFunctional Programming Patterns with Java8
52mThe modern view on implementation of design patterns (RU)
43mDesign Patterns in Java 8
44mDesign Patterns in the Light of Lambda Expressions
51mRevisiting Effective Java in 2020
43mRolling with New Java Enhancements: Practical Design Patterns
