separate-domain-and-application-logic

Installation
SKILL.md

Domain Logic vs Application Logic

ABP splits business logic into two layers, and the hardest DDD question in practice is which layer a given rule belongs to. Getting it wrong leaks use-case concerns into the domain (making it un-reusable) or scatters core rules across application services (making them un-enforceable). This skill is the decision guide; the mechanics of writing each building block live in model-domain-aggregates and application-services.

  • Domain logic = the core domain rules of the system, independent of any single use case. It lives in entities/aggregate roots (rules about their own state) and in domain services (rules that span aggregates or need a repository).
  • Application logic = the use case. It lives in application services, which orchestrate domain objects to fulfill one user interaction.

When to Use

Installs
27
GitHub Stars
32
First Seen
Aug 15, 2026