Entity
ELI5 — The Vibe Check
An entity is a domain object with a unique identity that persists over time. A user is an entity — even if they change their name and email, they're still the same user because of their ID. Entities are tracked by who they ARE, not what they contain.
Real Talk
In domain-driven design, an entity is a domain object distinguished by its identity rather than its attributes. Two entities with identical attributes but different IDs are different objects. Entities have a lifecycle, can change state over time, and typically map to database records. They encapsulate business behavior and enforce domain invariants.
When You'll Hear This
"User is an entity — it has a unique ID that never changes even when attributes update." / "Entities maintain identity continuity across state changes."
Related Terms
Aggregate Root
An aggregate root is the boss entity that controls a group of related objects. Want to add an item to an order?
Domain-Driven Design (DDD)
DDD says your code should speak the same language as the business.
Repository Pattern
Repository Pattern puts a layer between your business logic and your database, so your business code never writes SQL directly.
Value Object
A value object is defined by its values, not its identity. Two $10 bills are interchangeable — you don't care which specific bill you have.