Rich versus Anemic Domain Model
Our architecture style leaves open how to implement our domain model. This is a blessing because we can do what seems right in our context, and a curse because we don't have any guidelines to help us.
A frequent discussion is whether to implement a rich domain model following the DDD philosophy or an "anemic" domain model. I'm not going to favor one of the two, but let's discuss how each of them fits into our architecture.
In a rich domain model, as much of the domain logic as possible is implemented within the entities at the core of the application. The entities provide methods to change state and only allow changes that are valid according to the business rules. This is the way we pursued with the Account entity previously.
Where is our use case implementation in this scenario?
In this case, our use case serves as an entry point to the domain model. A use case then only represents the intent of the user and translates it into orchestrated...