What are DDD, SOLID and dependency inversion?
Practice this questionDefinition:
Domain-driven design models software around business concepts and their boundaries. SOLID is a group of design principles for keeping responsibilities focused and dependencies manageable. Dependency inversion is one of those principles: high-level business policy depends on an abstraction rather than a particular low-level implementation.
Key points:
-
DDD models business concepts and clear domain boundaries.
-
SOLID: one responsibility, extend safely, replace subtypes safely, keep interfaces focused, depend on abstractions.
-
Dependency inversion lets business logic use a contract instead of a specific database or vendor class.
-
Use business names such as AllocationPolicy when they clarify behavior, but avoid introducing abstractions with no expected variation or testing benefit.
Interview point:
- Explain a real dependency you separated and how that made a change safer, instead of only reciting acronyms.