Gof Patterns In Modern Java

Which Gang-of-Four patterns modern Java and Spring already implement, which they only change the expression of, and which still need writing by hand. Covers records, sealed types and pattern matching against Visitor, State, Composite and Interpreter; lambdas and functional interfaces against Strategy, Command, Factory Method and Observer; the container against Singleton, Abstract Factory and Factory Method; framework mechanisms against Decorator and Proxy; and what virtual threads and ScopedValue change about patterns that carry context or defer work. Use when implementing a pattern from an older text, when a hand-rolled mechanism duplicates something the framework provides, or when deciding whether a pattern is obsolete or merely invisible. Does not cover choosing a pattern (gof-pattern-selection), any individual pattern's guidance (the gof-\* skills), enterprise patterns against frameworks (patterns-and-modern-frameworks), or the inheritance decision (java-composition-over-inheritance).

robsonkades Updated

File contents

robsonkades/agent-skills/tree/main/skills/gof-patterns-in-modern-java commit 38a97d570c

Frequently asked questions

npx skillmds@latest add robsonkades/gof-patterns-in-modern-java