Skip to main content

ddd

Domain-Driven Design, bounded contexts, aggregates, and domain modeling

설치로 이동

소스 정보

저장소
NeuralBlitz/Mito
최근 소스 활동
2026년 3월 22일 13:29
감지된 SKILL.md 언어
영어
스타
0
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
ddd
description
Domain-Driven Design, bounded contexts, aggregates, and domain modeling
license
MIT
compatibility
opencode
metadata
{"audience":"developers","category":"software-development"}
## What I do - Design bounded contexts and their boundaries - Create rich domain models - Implement aggregates and aggregate roots - Design value objects - Define domain events - Apply strategic and tactical DDD ## When to use me When building complex domain logic, modeling business domains, or structuring large applications. ## Strategic Design ### Bounded Contexts - Clear boundaries around domain models - Each context has its own ubiquitous language - Context mapping relationships: - **Customer/Supplier**: Upstream/downstream - **Conformist**: Downstream follows upstream - **Anticorruption Layer**: Translation layer - **Open Host Service**: Published language - **Separate Ways**: No relationship ### Ubiquitous Language - Shared language between developers and domain experts - Embedded in code (class names, methods) - Consistent terminology ### Context Maps - Visual representation of system boundaries - Integration points - Team responsibilities ## Tactical Design ### Entities - Identity that persists over time - Mutable state - Unique identifier ```java class Order { private OrderId id; private Money total; // Entity with unique ID } ``` ### Value Objects - Immutable - No identity - Compares by value ```java class Money { private final BigDecimal amount; private final Currency currency; // Value object - immutable, compared by value } ``` ### Aggregates - Cluster of related objects - Aggregate root controls access - Invariants enforced within boundary - One entity per aggregate typically ```java class OrderAggregate { private OrderId id; private List<OrderLine> lines; // Only aggregate root can modify public void addLine(Product product, int quantity) { // Invariants enforced here } } ``` ### Domain Events - Something significant happened - Immutable - Named in past tense ```java class OrderPlacedEvent { private OrderId orderId; private Money total; private Instant occurredAt; } ``` ### Repositories - Collection-like interface - Persist aggregates - Abstract storage details ### Domain Services - Operations that don't belong to entities - Cross-aggregate operations - Stateless ### Factories - Complex object creation - Hide implementation details ## DDD Patterns - CQRS with DDD - Event sourcing - Specification pattern - Side effects - Policy - Strategy
GitHub에서 보기