Chapter 5. Entities
I’m Chevy Chase . . . and you’re not.
—Chevy Chase
There is a tendency for developers to focus on data rather than the domain. This can happen with those new to DDD, because of the prevailing approaches to software development that place importance on the database. Instead of designing domain concepts with rich behaviors, we might think primarily about the attributes (columns) and associations (foreign keys) of the data. Doing so reflects the data model into object counterparts, which leads to almost every concept in our “domain model” being coded as an Entity abounding with getter and setter methods. It’s easy to find tools that will generate all that for us. Although there may be nothing wrong with property accessors, that’s ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access