service-layer
Installation
SKILL.md
Service Layer (Application Services)
When to use
- The user wants one class per use case that coordinates domain objects and repositories to carry out an operation.
- The user wants to move business logic out of controllers so the delivery layer only translates requests and responses.
- The user wants a single place that begins and commits the transaction wrapping a whole use case.
When NOT to use
- Do not reach for a service layer as the place to put domain rules that belong on the entity or value object itself.
- Do not add an application service that only forwards a call straight to a repository with no coordination or transaction.