O'Reilly logo

Implementing Domain-Driven Design by Vaughn Vernon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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!

—Willy Wonka

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required