Chapter 11. Factories
I can’t abide ugliness in factories! In we go, then! But do be careful, my dear children! Don’t lose your heads! Don’t get overexcited! Keep very calm!
Of all the patterns used in DDD, Factory is probably one of the better known. Highly publicized in Design Patterns [Gamma et al.] are Abstract Factory, Factory Method, and Builder. I won’t in any way attempt to overshadow the advice given there, or that provided by [Evans]. The focus here is to provide examples of how you can use Factories in the domain model.