我正在决定是否应该使用富域模型而不是贫血域模型,并寻找两者的好例子。
I have been building web applications using an Anemic Domain Model, backed by a 服务—— > 资源库—— > 存储 layer system, using 验证 for BL validation, and putting all of my BL in the Service layer.
I have read Eric Evan's DDD book, and he (along with Fowler and others) seems to think Anemic Domain Models are an anti-pattern.
所以我真的很想了解一下这个问题。
此外,我真的在寻找一些好的(基本的)丰富域模型的例子,以及它所提供的优于贫血域模型的好处。