Design principles and patterns
Дизайн уровня классов на примерах Spring: SOLID, GRASP, все 23 паттерна GoF, DRY/KISS/YAGNI и другие инженерные принципы — где живут во фреймворке и как применять у себя.
Why it matters for UCP. UCP code is classes: Handlers, aggregates, ports, adapters. The SOLID principles and GoF patterns are the vocabulary each of them is designed with; Spring itself is built on these principles, and you cannot use the framework deliberately without them. Part of the preparation program.
This section is about class-level design — as opposed to architectural patterns, which operate at the service level. The examples are on Spring: each principle and pattern is shown both inside the framework itself and in application code.
Section articles
- SOLID with Spring examples — the five principles: how the framework itself embodies them and how to apply them in your own code.
- GoF patterns in Spring — all 23 patterns: which ones live in every Spring application, which ones you write by hand, and which ones stayed back in 1994.
- GRASP with Spring examples — nine answers to the question "which class should this responsibility go to?".
- DRY, KISS, YAGNI and other engineering principles — nine decision-level principles: from a single line of code to the choice to add a second microservice.
Related
- Spring — the framework's mechanics: DI, AOP, proxies — the means by which Spring implements these principles.
- Architectural patterns — the next level: CQRS, Hexagonal, resilience.
- DDD patterns — domain design: aggregates, value objects, events.
- Java Style Guide — style and design rules with codes for AI review.