Skip to content

Domain-Driven Design

Question

Explain Domain Driven Design.

Short interview answer

Domain-driven design (DDD) models complex business behavior with the people who understand that domain, then protects that model from infrastructure details. It is most useful where business rules are genuinely complex, not for every simple create/read/update/delete application.

Detailed answer

DDD starts with a shared language between developers and domain experts. In a trading system, “settlement”, “trade”, and “position” should have precise business meanings in the model rather than being vague database labels. A bounded context limits where a particular meaning applies, while entities, value objects, aggregates, and domain events express rules and changes inside that context. The approach pays off when rules evolve and carry significant business meaning. For a small reporting or simple CRUD application, its modeling and coordination cost may outweigh the benefit; a focused hybrid can use DDD only for the complex transactional area.

Glossary

  • CRUD: Create, read, update, and delete.
  • DDD: Domain-driven design.

Sources