ちと、小難しい話になります。DDDの話なんで、 コードで学ぶドメイン駆動設計入門 〜アグリゲート編〜 - じゅんいち☆かとうの技術日誌 でも取り上げたアグリゲートに関する考察です。どうあるべきかはちょっと分かっていません。これを読んでこうしたらよいのでは?と思う方、意見歓迎です。インターネットって一方だと面白くないので議論したいですね。 アグリゲートってライフサイクルの境界を扱うための設計パターンです。ライフサイクルで思い出すのはリポジトリとファクトリ。この二つのオブジェクトが扱うのがアグリゲートです。ライフサイクルは至るところに出てくるので、結構大事で、設計の根幹に影響するオブジェクトのひとつではないかと思います。 アグリゲートは、内部のエンティティやバリューオブジェクトを集約している境界で、その境界はエンティティであり、ルートエンティティと呼ばれる。 グローバルな同一性を持つエンティテ
Context In many applications, the business logic accesses data from data stores such as databases, SharePoint lists, or Web services. Directly accessing the data can result in the following: Duplicated code A higher potential for programming errors Weak typing of the business data Difficulty in centralizing data-related policies such as caching An inability to easily test the business logic in iso
Repository Mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects. A system with a complex domain model often benefits from a layer, such as the one provided by Data Mapper, that isolates domain objects from details of the database access code. In such systems it can be worthwhile to build another layer of abstraction over the mapping lay
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く