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

Factory on Service

Since much of how I use Services as Factories is related to Integrating Bounded Contexts (13), I leave the bulk of the discussion to that chapter. In that chapter my focus is more on integrating with Anti-Corruption Layer (3), Published Language (3), and Open Host Service (3). Here I want to emphasize the Factory itself and how a Service can be designed as one.

Image

The team now provides another example from the Collaboration Context. It’s a Factory in the form of CollaboratorService, producing Collaborator instances from tenant and user identity:

package com.saasovation.collaboration.domain.model.collaborator; ...

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