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; ...

Get Implementing Domain-Driven Design now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.