anemic-domain-model

Concrete examples on why the 'Anemic Domain Model' is considered an anti-pattern [closed]

蹲街弑〆低调 提交于 2019-11-29 20:43:09
I apologize if this is a duplicate, but I couldn't find any concrete examples on the topic in related questions. After reading Martin Fowler's article on the 'Anemic Domain Model' , I'm left wandering as to why is this considered an anti-pattern. Even does the majority of enterprise developers consider it an anti-pattern, since AFAIK probably 90% of the j2ee applications are designed in an 'anemic' way ? Can someone recommend further reading on the topic (other than the 'Domain Driven Design' book), or even better, give a concrete examples on how this anti-pattern is affecting application

If you are forced to use an Anemic domain model, where do you put your business logic and calculated fields?

一曲冷凌霜 提交于 2019-11-29 19:38:00
Our current O/RM tool does not really allow for rich domain models, so we are forced to utilize anemic (DTO) entities everywhere. This has worked fine, but I continue to struggle with where to put basic object-based business logic and calculated fields. Current layers: Presentation Service Repository Data/Entity Our repository layer has most of the basic fetch/validate/save logic, although the service layer does a lot of the more complex validation & saving (since save operations also do logging, checking of permissions, etc). The problem is where to put code like this: Decimal CalculateTotal

Concrete examples on why the 'Anemic Domain Model' is considered an anti-pattern [closed]

╄→尐↘猪︶ㄣ 提交于 2019-11-28 16:50:35
问题 I apologize if this is a duplicate, but I couldn't find any concrete examples on the topic in related questions. After reading Martin Fowler's article on the 'Anemic Domain Model', I'm left wandering as to why is this considered an anti-pattern. Even does the majority of enterprise developers consider it an anti-pattern, since AFAIK probably 90% of the j2ee applications are designed in an 'anemic' way ? Can someone recommend further reading on the topic (other than the 'Domain Driven Design'

If you are forced to use an Anemic domain model, where do you put your business logic and calculated fields?

萝らか妹 提交于 2019-11-28 15:33:11
问题 Our current O/RM tool does not really allow for rich domain models, so we are forced to utilize anemic (DTO) entities everywhere. This has worked fine, but I continue to struggle with where to put basic object-based business logic and calculated fields. Current layers: Presentation Service Repository Data/Entity Our repository layer has most of the basic fetch/validate/save logic, although the service layer does a lot of the more complex validation & saving (since save operations also do

Rich vs Anemic Domain Model

Deadly 提交于 2019-11-27 16:50:21
I am deciding if I should use a Rich Domain Model over an Anemic Domain Model, and looking for good examples of the two. I have been building web applications using an Anemic Domain Model, backed by a Service --> Repository --> Storage layer system, using FluentValidation 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) seem to think Anemic Domain Models are an anti-pattern. So I was just really wanting to get some insight into this problem. Also I am really looking for some good (basic) examples of a Rich