ドメインモデルを生み出す、ドメイン分析は1980 年代はじめからあるらしい。 1995 年発刊のオブジェクト指向方法序説〈基盤編〉ジェームズ マーチン著で、ドメインとい う用語が登場する。 歴史を紐解きたい方は、こちらをごらんください。ドメインもしくはドメインモデルという概 念が登場する書籍一覧 FYI: ドメインという概念は昔からある Domain analysis Wikipedia 引用: In software engineering, domain analysis, or product line analysis, is the process of analyzing related software systems in a domain to find their common and variable parts. It is a model of wider business context for the system. The term was coined in the early 1980s by James Neighbors. Domain analysis produces domain models using methodologies such as domain specific languages, feature tables, facet tables, facet templates, and generic architectures, which describe all of the systems in a domain. Several methodologies for domain analysis have been proposed. Scala でのドメインモデリングのやり方 Scala 関西Summit 2018 4 / 40
レイヤーを分割しよう レイヤーをプロジェクトとして分割し、依存の方向を制御してください 循環参照を作ってからでは遅いです! // インフラストラクチャ層 val infrastructure = (project in file("infrastructure")).settings(...) // ドメイン層 val domain = (project in file("domain")).settings(...).dependsOn(infrastructure) // ユースケース層 val useCase = (project in file("use-case")).settings(...).dependsOn(domain, infrastructure) // インターフェイス層 val interface = (project in file("interface")).settings(...).dependsOn(useCase, infrastructure) // アプリケーション本体 val boot = (project in file("boot")).settings(...).dependsOn(interface, infrastructure) val root = (project in file(".")).settings(...).dependsOn(boot) Scala でのドメインモデリングのやり方 Scala 関西Summit 2018 11 / 40