답변출처·10단계
DEV CommunityModeling Shared Entities Across Bounded Contexts in ...
PikoPostExamples of shared kernel in Domain Driven Design - PikoPost
Adonis MediaUsing Two Domains for One Website: Benefits & Best Practices
Software Engineering Stack ExchangeDDD Referencing objects from other bounded contexts
softwareengineering.stackexchange.com favicon
도메인 주도 설계(DDD) 관점에서, 메뉴(Menu) 엔티티가 게시판, 가게 등 여러 도메인(바운디드 컨텍스트)에서 사용된다면,메뉴 엔티티의 위치는 다음 원칙에 따라 결정하는 것이 좋습니다.
두 도메인에서 메뉴의 의미, 속성, 행위가 완전히 동일하다면,
"Shared Kernel" 패턴처럼 **공통 모듈(공유 커널)**에 Menu 엔티티를 두고
각 도메인에서 이를 참조할 수도 있습니다2.
board.menu.Menu
store.menu.Menu
“Rather than forcing a single entity to serve multiple masters, DDD encourages modeling the concept according to the specific domain's needs.”— 1
요약: