Since Eric Evans' seminal work on DDD, there have arisen many variations and adaptations of the patterns and practices within DDD. Today, there are as many implementations proclaiming to be DDD as there are practitioners of DDD. We will focus on adhering to the tenants described previously as we design our app. Variants will be noted as they are created.
During this chapter, all code related to our domain will be placed within a Domain
folder in the project. The Domain
folder will contain subfolders for each code grouping.
The entities within the BrewHow domain model almost mirror the data model at this point. We have domain entities for the Category
, Recipe
, Review
, and Style
data models named CategoryEntity
, RecipeEntity
, ReviewEntity
, and StyleEntity
respectively. These entities are responsible for business rules and logic specific to their role in the domain.