tag:blogger.com,1999:blog-20196010.post113994310956636502..comments2023-04-02T10:19:37.644+02:00Comments on Frederik Gheysels' DevLog: Domain Driven Design / Entity (Yourdon-Chen) approachFrederik Gheyselshttp://www.blogger.com/profile/15416462808733991725noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-20196010.post-83921503688681829362007-03-13T13:11:00.000+01:002007-03-13T13:11:00.000+01:00>> If we take the 'complex' logic and behaviour ou...>> If we take the 'complex' logic and behaviour out of our domain classes, what else is left but some dumb entities that are nothing more then a data-holder, while all our logic is in specifications / managers ?<BR/><BR/>No this isn't what you are supposed to do. Dumb entities is moving towards an anemic model which is the exact <I>opposite</I> of what DDD is about.<BR/><BR/>The idea of specifications isn't to take complex logic out of your domain classes but to allow business rules to become selfcontained. This way your class isn't cluttered with noise and you can reuse specifications across your application preserving them in the domain removing the need to spread the logic across the various layers. <BR/><BR/>Avoid the tempation of just removing every piece of 'complex' code in out of your entities and placing them into a seperate class. <BR/><BR/>Also some may question whether your entities should be accessing repositories directly (this gets a bit religious though!).Peter Gillard-Mosshttps://www.blogger.com/profile/10275408277486693139noreply@blogger.comtag:blogger.com,1999:blog-20196010.post-1148259946478687072006-05-22T03:05:00.000+02:002006-05-22T03:05:00.000+02:00Yeah.. that's about all the difference between the...Yeah.. that's about all the difference between the two..Narenhttps://www.blogger.com/profile/05748449568782814919noreply@blogger.com