
You model your business using Entities (the ID matters) and Value Objects (the values matter). You use Repositories to retrieve and store them. You create them with the help of Factories. If an object is too complex for a single class, you’ll create Aggregates that will bind Entities & Value Objects under the same root. If a business logic doesn’t belong to a given object, you’ll define Services that will manipulate the involved elements. Eventually, when the state of the business changes (a change that matters to business experts), you’ll publish Domain Events to communicate the change.
…ens collectively. So, too, does clean code. When there’s a culture of cleanliness on your dev team, respect for the demands of writing good code from management, and a personal belief and dedication to writing the cleanest code possible from each individual dev…