We examined the reasons for using Factories in DDD and how they often fit into the model.
• You now understand why the use of Factories can produce expressive models that more closely adhere to the Ubiquitous Language in context.
• You’ve seen two different Factory Methods implemented as Aggregate behaviors.
• This helped you learn how to use Factory Methods to create Aggregate instances of other types, all while ensuring the correct production and use of sensitive data.
• You also learned how Domain Services can be designed as Factories, even interacting with other Bounded Contexts and translating foreign objects to local types.
Next, we’ll take a look at how Repositories can be designed for two primary styles of persistence, along ...