Skip to content

Instantly share code, notes, and snippets.

@grimrose
Last active August 29, 2015 13:56
Show Gist options
  • Save grimrose/9166907 to your computer and use it in GitHub Desktop.
Save grimrose/9166907 to your computer and use it in GitHub Desktop.
#DDDSheep #8

DDD読書会 #8 + α

http://connpass.com/event/5072/

http://www.slideshare.net/j5ik2o/scala-with-ddd

ドメインモデル

  • Hexagonal Architecture
  • ユビキタス言語を用いて、Domainのモデルを定義する。
  • シナリオ -> Model -> 実装 -> シナリオ -> ...
  • シーン
  • オンメモリ・レポジトリ
  • レイヤー化
  • インフラ層とアプリケーション層からドメイン層を切り離す。
    • 他のフレームワークから切り替えることが出来るようになる。
    • JPAやSpring Dataに依存しないほうが望ましい。
  • MVCのModelの中を更に分類する。
  • Observer patternやEvent Listenerで依存を切り分ける
  • EntityはIdentityで識別するようにする。
  • ○○フラグが出てきたら、ユビキタス言語にあるか確認する。

ライフサイクル管理

  • Modelにユビキタス言語があるか確認する。
  • ARのようなModelは、domainのModelよりinfraのModelにした方が現実的
  • 集約毎に操作する
  • トランザクションの境界と集約
  • Repository Decorator
  • Transactionを扱うような場合、Repository用のフレームワークを作ったほうが良い。
  • 但し、一番面倒
  • P.70を参考。

scalikejdbc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment