【DDD】Golangを使ってモデルでドメイン知識を表現してみた

はじめに zenn の記事の転載です。 これはGo Advent Calendar 2021の 6 日目の記事です。 DDD についてはエリック・エヴァンス先生や先人の鬼ほどわかりやすい書籍があるので、 こちらを読むことをおすすめします。(笑) ドメイン駆動設計 モデリング/実装ガイド ドメイン駆動設計 サンプルコード&FAQ ドメイン駆動設計入門 ボトムアップでわかる!ドメイン駆動設計の基本 なのでここでは、DDD を詳しく解説などはせずに、 Golang を使ってモデルでドメイン知識をどのようにソフトウェアに落とし込むのか、 簡単な具体例をあげて説明していきます。 ドメイン駆動設計(DDD)とは? とはいっても、ドメイン駆動設計とはなんぞやをカンタンに説明しておきますね。 DDD Referenceでの定義を以下に記します。 Domain-Driven Design is an approach to the development of complex software in which we: Focus on the core domain. Explore models in a creative collaboration of domain practitioners and software practitioners. Speak a ubiquitous language within an explicitly bounded context. This three-point summary of DDD depends on the definition of the terms, which are defined in this booklet....

2021/12/05 · 5 min · 944 words