System designInterview preparation
Intermediate·Concept·2 min read

What are DDD, SOLID and dependency inversion?

Practice this question

Definition:

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.
Adapted from 07_SYSTEM_DESIGN_ARCHITECTURE.md · “What are DDD, SOLID and dependency inversion?”. Code examples are study fragments. Difficulty and core labels are editorial estimates; version-specific behavior should be checked against your project.