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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.