- Audience: Java developers who work with Spring every day and want to see the patterns behind it, and teams that plan to refactor grown code and need a shared design vocabulary
- Prerequisites: solid Java (interfaces, generics, lambdas); experience with Spring Boot helps
- Duration: 1 day (creational and structural patterns) or 2 days (plus behavioral patterns and anti-patterns)
- Format: closed in-house training for your team only, live online, up to 20 participants, in German or English; works standalone or before the Clean Code training
Your team already uses many of the 23 GoF patterns, because Spring is built on them. Factory Method sits behind the BeanFactory, a Proxy behind every @Transactional, Template Method behind JdbcTemplate and Observer behind ApplicationEventPublisher. Once developers see that, the patterns stop being textbook diagrams and become decisions they can make deliberately in their own code.
What We CoverCreational & Structural Patterns
- Creational patterns: Factory Method, Abstract Factory, Builder, Singleton (and why it's often wrong), Prototype
- Builder in practice: immutable objects, fluent APIs, Lombok @Builder
- Factory patterns in Spring: BeanFactory, FactoryBean, @Bean methods
- Structural patterns: Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy
- Decorator in Spring: AOP proxies, transaction and security interceptors
- Facade in practice: service layer hiding complex subsystems
- Proxy patterns: JDK dynamic proxies vs CGLIB — how Spring AOP works
- Adapter pattern: integrating third-party APIs with internal interfaces
Behavioral Patterns & Anti-Patterns
- Behavioral patterns: Chain of Responsibility, Command, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor
- Strategy pattern: replacing conditionals with polymorphism
- Observer in Spring: ApplicationEventPublisher, @EventListener
- Template Method: Spring's JdbcTemplate, RestTemplate — the pattern they use
- Command pattern: undoable operations, request queuing
- State machine patterns: Spring State Machine, explicit state vs if-else
- Pattern combinations: real-world examples where multiple patterns work together
- Anti-patterns: God Object, Anemic Domain Model, Golden Hammer — recognizing over-engineering
- Refactoring to patterns: identifying where patterns improve existing code
Developers who recognize design patterns in the frameworks they use daily, apply them deliberately when the fit is clear, and avoid them when simpler code is better.
- Identify and name GoF patterns in Spring, Java, and third-party library code
- Apply Builder, Strategy, Observer, and Template Method deliberately in new code
- Recognize when a pattern improves design vs when it adds unnecessary abstraction
- Refactor existing code toward a pattern when the problem it solves appears
What are the GoF design patterns?
They are the 23 object-oriented design patterns from the 1994 book "Design Patterns" by Gamma, Helm, Johnson and Vlissides, the "Gang of Four". They fall into three groups: creational, structural and behavioral patterns.
Are GoF patterns still relevant with modern Java and Spring Boot?
Yes. Spring uses them internally, so understanding them explains how the framework behaves. Modern Java makes some of them lighter, for example Strategy and Command with lambdas, and the training shows both the classic and the modern form.
Should we book one day or two?
Day 1 covers creational and structural patterns, including how Spring uses factories and proxies. Day 2 adds behavioral patterns and anti-patterns such as God Object and Anemic Domain Model, plus refactoring existing code toward a pattern.
Which language are the examples in?
All examples are in Java with Spring. The sessions are held in German or English.
How do we book the training for our team?
Send your team size, your Java and Spring version and your preferred dates. You get a proposal with a 1- or 2-day outline.
Request the Design Patterns training
Well suited for mid-level Java developers building a stronger object-oriented design foundation. Works as a standalone day or before the Clean Code training.
Tell me your team size, your Java and Spring version and your preferred dates – you get a proposal with a 1- or 2-day outline.
Need hands-on help in your own project instead of a training? I also take on architecture and implementation work, fully remote.
Request the Design Patterns training