Domain Services (or just Services in DDD) is used to perform domain operations and business rules. In his DDD book, Eric Evans describes a good Service in three characteristics: The operation relates to a domain concept that is not a natural part of an Entity or Value Object.
Application Services vs Domain Services
While both of Application Services and Domain Services implement the business rules, there are fundamental logical and formal differences;
- Application Services implement the use cases of the application (user interactions in a typical web application), while Domain Services implement the core, use case independent domain logic.
- Application Services get/return Data Transfer Objects, Domain Service methods typically get and return the domain objects (entities, value objects).
- Domain services are typically used by the Application Services or other Domain Services, while Application Services are used by the Presentation Layer or Client Applications.