DDD
Domain Driven Design
ドメイン駆動設計
Eric Evans
定義
Focus on the core complexity and opportunity in the domain
Explore models in a collaboration of domain experts and software experts
Write software that expresses those models explicitly
Use a ubiquitous language inside a bounded context
a software design approach focusing on modelling software to match a domain according to input from that domain's experts (wikipedia)
Domain = プログラムを適用する対象となる領域
Modeling
Domain の概念を抽象化してモデルを作ること
Model = 現実の事象or概念を抽象化したもの
Domain Object
ソフトウェアで動作するモジュールとして表現したもの
Value Object (値オブジェクト)
primitive ではなくシステム固有の値を表した不変なオブジェクト
表現力向上、値の制限、ロジックの集約が目的
Entity
可変なオブジェクト
識別子を持ち、それをもって同一と判断する
Domain Service
Value Object, Entity を扱うもの
infrastructure に絡まない処理を書くことが多い
Repository
永続化や再構築を担う
Application Service
ユースケースを実現するオブジェクト
Factory
オブジェクトの生成を責務とするオブジェクト
ref
https://en.wikipedia.org/wiki/Domain-driven_design
https://www.zweitag.de/en/blog/ddd-europe-2016/
https://github.com/little-hands/ddd-q-and-a
https://little-hands.booth.pm/items/3363104
https://techbooster.booth.pm/items/392260
https://zenn.dev/kohii/articles/b96634b9a14897
https://www.infoq.com/jp/minibooks/domain-driven-design-quickly/
https://zenn.dev/hisamitsu/articles/2937fc4dd9bd4c
https://eh-career.com/engineerhub/entry/2020/05/26/103000
#TODO