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

Modeling a Service in the Domain

Depending on the purpose of a Domain Service, it can be quite simple to model. You’ll have to decide whether or not your Service should have a Separated Interface [Fowler, P of EAA]. If so, this might be the interface definition:

package com.saasovation.identityaccess.domain.model.identity; public interface AuthenticationService {     public UserDescriptor authenticate(             TenantId aTenantId,             String aUsername,             String aPassword); }

The interface is declared in the same Module (9) as the identity-specific Aggregates, such as Tenant, User, and Group. That is done because AuthenticationService is an identity concept, and we currently place all identity-related ...

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