'anemic domain model'에 해당되는 글 1건

  1. 2006/07/14 Anemic Domain Model (9)

2006/07/14 07:55 Developer

Anemic Domain Model

Updated to add that domain logic is the antidote to domain anemia

Indeed often these models come with design rules that say that you are not to put any domain logic in the the domain objects. Instead there are a set of service objects which capture all the domain logic. These services live on top of the domain model and use the domain model for data.

The fundamental horror of this anti-pattern is that it's so contrary to the basic idea of object-oriented design.
-> Anemic Domain Model is anti-pattern.

many people think that anemic objects are real objects, and thus completely miss the point of what object-oriented design is all about.

Domain Driven Design(DDD) - eric evan
: The key point here is that the Service Layer is thin - all the key logic lies in the domain layer

I don't know why this anti-pattern is so common. I suspect it's due to many people who haven't really worked with a proper domain model, particularly if they come from a data background. Some technologies encourage it; such as J2EE's Entity Beans which is one of the reasons I prefer POJO domain models.

Anemic Domain Model
http://www.martinfowler.com/bliki/AnemicDomainModel.html


25 November 2003에 martinfowler가 쓴 글을 중에 중요부분만 발췌해서 정리를 했다.
개념자체나 anemic domain model이 EJB에서 악영향으로 나온 산물중의 하나라고 생각하는 부분이나, OOP의 초심에 대한 얘기는 놀랍다. 이게 2003년에 쓴 글이라니...^^;

martinfolwer의 POJO사랑으로 결국 EJB3.0에서는 개념이 POJO기반으로 바뀌지 않았나 싶다.
Posted by ologist
이전버튼 1 이전버튼

블로그 이미지
ologist

공지사항

Yesterday171
Today54
Total34,797

달력

 « |  » 2012.02
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

최근에 받은 트랙백

글 보관함