Domain Logic Organization

Choosing where business rules live — Transaction Script, Domain Model or Table Module — from the shape of the logic rather than from convention, and recognising when the choice made no longer fits. Use when starting a new module and the "standard" layered structure is about to be applied by default, when a service class has grown past a thousand lines of procedural steps, when entities have only getters and setters and every rule sits in a service, when the same business rule is implemented in three places, when a domain model is proposed for CRUD screens, when set-based updates are being rewritten as object loops, or when a report needs data that the aggregate boundary makes expensive to reach. Does not cover the application service that wraps whichever choice you make (service-layer-design), the persistence patterns underneath it (data-source-patterns, repository-pattern), transaction boundaries (enterprise-transactions), or the migration between organisations once chosen (architecture-refactoring-paths).

robsonkades Updated

File contents

robsonkades/agent-skills/tree/main/skills/domain-logic-organization commit 62b0b0bb43

Frequently asked questions

npx skillmds@latest add robsonkades/domain-logic-organization