Loading…
SOLID, clean architecture, DDD, and design patterns
Staff and senior engineer interviews lean heavily on architectural judgement. Cover SOLID, creational/structural/behavioral patterns, clean and hexagonal architecture, DDD, CQRS, and event sourcing — with concrete before/after examples and refactoring case studies you can map to any mainstream stack.
How to use this hub
2 modules cover software architecture & design patterns end-to-end. Open the first module, use Open question 1 on its landing page, and use Next at the bottom of each answer to stay in order.
Revision sheet
~12 min · 5 sections · save as PDF
Design patterns interview questions test whether you can apply the Gang-of-Four classics to real Java code — Singleton (and why it is a smell), Factory and Abstract Factory, Builder (with the Java records angle), Strategy, Observer, Decorator, Adapter, Proxy, and the patterns Spring itself uses (Template Method, IoC, AOP). Each answer leads with the problem the pattern solves, the Java implementation, and the trade-offs (when not to use it).
Three families — name the family before the pattern.
Spring uses many by default — DI ≈ inversion-of-control, AOP ≈ proxy, JdbcTemplate ≈ template method.
The interview surface for this module breaks into these focus areas:
"This problem is a classic
from the family — it gives me . The trade-off is , and I'd skip the pattern when ."
Revision sheet
~12 min · 5 sections · save as PDF
Software architecture interview questions cover the higher-level patterns senior interviews probe — layered vs hexagonal vs clean architecture, DDD (entities, aggregates, bounded contexts, ubiquitous language), CQRS and event sourcing, the SOLID principles applied at the system level, modular monolith vs microservices, and the architectural trade-offs interviewers love to discuss (consistency vs availability, cohesion vs coupling). Use this page for staff/principal-level interviews where the question is rarely "how would you implement X" and more often "how would you decompose Y".
Four lenses for any architecture question:
Pick the lightest that solves the problem. Senior signal = articulate trade-offs.
The interview surface for this module breaks into these focus areas:
"I'd start with a modular monolith using hexagonal boundaries, isolate the domain from infra, draw
with explicit integration patterns, and only split into services when demands it."