DDD teaches us to build our classes as their prototypes of the real world.
So, instead of using setters
job = new Job job.person = person job.since = time.Now() job.title = title
we define well-known methods in our aggregation root
job = person.promote(title, /** since=time.Now() **/)
Now the tricky part
Suppose we have a UI for HR, where he enters a new title through the HTML form and makes a typo like "prgrammer" (of course, in the real application there will be a selected list, but here we have text input) or selects the wrong date (for example, by default today)
Now we have a problem. There are no typos in the real world. Our John Doe is definitely a "programmer" and never a "programmer"
How do we fix this typo in our domain model?
Our Person has only promote , demote , fire , etc. methods that reflect the HR domain model.
We could cheat a little and modify the Job entry directly, but now we have a Job.setTitle method that does not reflect our domain model, and the setters are evil, you know.
It may seem a little “academic,” but it really scares me when I try to create a good domain model for a complex application.