3層サービスアプリケーション(MS-TLSA)とドメイン駆動デザイン(DDD)

ドメインロジックの組織化について、3層サービスアプリケーション(MS-TLSA)とドメイン駆動デザイン(DDD≒ドメインモデル)と比較したよい記事なので紹介。

Organizing Domain Logic

MS-TLSAについて.NET Pet Shopのチェックアウト処理を元に紹介し、この処理をDDDで構築する場合とドメインロジックがどのように構成されているかを比較している。気になったポイントをピックアップしてみた。

The MS-TLA architecture also violates the object modeling principle of turning information about a real-world entity and the actions performed on it into responsibilities of the object representing the entity.

I think that it’s safe to say that the .NET Pet Shop check out logic is not only scattered over the Business Components and Business Entities implementations but also across the layers. In my experience this type of application often ends up being quite a tangled web of routines without a clear structure.

MS-TLSAではドメインロジックが分散されてしまうため構造的に良くない

It is a matter of choice how to organize domain logic in your applications.
For making the right choice you will need to understand both alternatives equally well.

MS-TLSAとDDDのやり方を理解して選択すべき


個人的には、MS-TLSAとDDDを組み合わせる方法(関心事に分離されたドンメインモデル)が一番気に入っている