You now have a basic understanding of DDD and we have applied that understanding to our app. Our app now enforces boundaries between persistence, logic, and display. We have identified and implemented entities that correspond to our domain model. The domain model is persisted and restored through the entities exposed by our repositories. Each entity within our model can contain logic specific to it and, should the need arise, we will implement services to handle interaction across entities and factories to construct complex entities. Our controllers provide the glue between the entities of our domain model and the presentation of the domain model to the user where they can, should they so choose, act upon it.
In the next chapter we will structure our app to use Inversion of Control and Dependency Injection. We will also look at designing code that adheres to the SOLID principles. Leveraging these patterns will provide us with a more maintainable code base.