Comparison
Application servicevsService layer
Application service
it fetches the aggregate, calls one method on it, saves it, and that is the entire body of the method.
The orchestration object for one use case: load, delegate to the domain, persist, publish. It holds no business rules — that is what makes it different from a domain service — and its thinness is the signal that the model is carrying its weight. Confusing the two is the most common source of an accidentally anaemic model.
Full entry →Service layer
there is one method per use case, it opens the transaction, calls the model, and contains no business rules itself.
A boundary layer defining an application's operations as a set of use-case methods, coordinating transactions, security and the domain objects that do the work. It is what keeps controllers thin and what gives an application an API independent of its user interface. It is also the layer that quietly absorbs domain logic until the model beneath it is anaemic, which is the failure to watch for.
Full entry →