Domain Model
ELI5 — The Vibe Check
A domain model is a code representation of your real-world business. If you're building a banking app, your domain model has Accounts, Transactions, and Balances — not databases and HTTP requests. It speaks the business language, not the tech language.
Real Talk
An object model of the business domain that incorporates both behavior and data, forming the core of domain-driven design. The domain model encapsulates business rules, invariants, and processes using entities, value objects, and aggregates, remaining independent of infrastructure concerns like databases or frameworks.
When You'll Hear This
"Keep your domain model pure — no database annotations, no framework dependencies." / "The domain model enforces business rules like 'an account balance can never go negative.'"
Related Terms
Aggregate
An aggregate is a cluster of domain objects that are treated as one unit for data changes.
Bounded Context
A bounded context is a boundary where a particular model and language applies. 'Customer' means one thing in Sales and something different in Shipping.
Domain-Driven Design (DDD)
DDD says your code should speak the same language as the business.
Entity
An entity is a domain object with a unique identity that persists over time.