abp-ddd

Implement Domain-Driven Design patterns within the ABP Framework.

14.4k|3.7k|Updated Dec 3, 2016
One-click install
npx skills add https://github.com/abpframework/abp --skill abp-ddd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: abp-ddd
Source: https://github.com/abpframework/abp/tree/main/.claude/skills/abp-ddd
Command: npx skills add https://github.com/abpframework/abp --skill abp-ddd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides guidance and best practices for implementing Domain-Driven Design (DDD) patterns within the ABP Framework, helping developers build robust and maintainable enterprise applications.

Core Features & Use Cases

  • Rich Domain Model: Learn to create entities with encapsulated behavior, not just data.
  • Aggregate Roots: Understand how to define consistency boundaries and manage child entities.
  • Repository Pattern: Implement custom repositories effectively and avoid common anti-patterns.
  • Domain Services: Structure business logic that spans multiple aggregates.
  • Domain Events: Utilize local and distributed events for inter-module communication.
  • Specifications: Write reusable query conditions for cleaner data access.
  • Use Case: When designing the core business logic for a new module in an ABP project, use this Skill to ensure your entities, aggregates, and services are implemented according to DDD principles and ABP conventions.

Quick Start

Use the abp-ddd skill to understand how to create a rich entity with private setters and public methods for enforcing invariants.

Frequently Asked Questions about abp-ddd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement aggregate roots and child entities in ABP?

Aggregate roots in ABP define consistency boundaries and manage child entities. You implement them by encapsulating behavior within the root, ensuring child entities are only modified through the aggregate root's public methods to enforce invariants.

How do I create a rich domain model with entities in ABP?

Creating a rich domain model involves building ABP entities with private setters and public methods. This enforces invariants and encapsulates business logic, ensuring your entities contain behavior rather than acting as simple data containers.

When should I use domain services versus aggregate roots in ABP?

Use domain services in ABP when business logic spans multiple aggregates and does not naturally belong to a single entity. Aggregate roots should handle internal state and child entity consistency, while domain services coordinate cross-aggregate operations.

How do I use domain events for inter-module communication in ABP?

Domain events in ABP utilize local and distributed events to handle inter-module communication. You publish events from your aggregates or services to decouple modules, ensuring that domain logic remains isolated and maintainable.

What are common repository pattern anti-patterns in ABP?

Common repository anti-patterns include over-querying, returning IQueryable directly, and placing business logic inside repositories. ABP repositories should strictly handle data access, keeping domain logic within aggregate roots and domain services.

Do I need C# and ABP.IO knowledge to apply Domain-Driven Design patterns?

Yes, understanding C# and the ABP.IO ecosystem is required. This guidance focuses on implementing DDD patterns specifically within ABP framework conventions, addressing entities, repositories, and domain services for enterprise software.