tag:blogger.com,1999:blog-33966934.post2665654207400919422..comments2010-03-07T06:22:31.884+00:00Comments on broloco: Sending Domain Objects Across the WireNeil Loganhttp://www.blogger.com/profile/04189198374043005196noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-33966934.post-31613156226671246312009-02-07T09:43:00.000+00:002009-02-07T09:43:00.000+00:00Hi Steven,My domain model has both properties, and...Hi Steven,<BR/><BR/>My domain model has both properties, and behaviour.<BR/><BR/>How did you conclude that it is anemic?<BR/><BR/>RichardRichard Brownhttps://www.blogger.com/profile/00271013570243148544noreply@blogger.comtag:blogger.com,1999:blog-33966934.post-32924129362114813922009-02-07T02:10:00.000+00:002009-02-07T02:10:00.000+00:00>> where your DTO is simply going to be a co...>> where your DTO is simply going to be a copy of the same properties that your domain object has, I think it can still be unnecessary repetition.<BR/><BR/>So... you're saying you don't really have a rich domain model, but rather a bunch of bit-buckets (a.k.a.: an anemic domain model)? If so, you've likely got much larger problems.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-33966934.post-12814824573245187902009-02-06T17:26:00.000+00:002009-02-06T17:26:00.000+00:00Hi Pete,I agree that this is correct in general (D...Hi Pete,<BR/><BR/>I agree that this is correct in general (DRY is really for copied logic).<BR/><BR/>However, where your DTO is simply going to be a copy of the same properties that your domain object has, I think it can still be unnecessary repetition.<BR/><BR/><BR/>Regarding Martin's first law of distribution, this is born of the mistake of having a chatty interface across the wire, which I entirely agree you should avoid.<BR/><BR/>'Something' has to go over the wire though; I just prefer to double my domain objects as DTOs while they are suitable for that purpose.<BR/><BR/><BR/>Thanks for the feedback.<BR/><BR/>Cheers,<BR/> RichardRichard Brownhttps://www.blogger.com/profile/00271013570243148544noreply@blogger.comtag:blogger.com,1999:blog-33966934.post-61440025349663218272009-02-06T17:00:00.000+00:002009-02-06T17:00:00.000+00:00Making DTO don't brake DRY as DTO don't have same ...Making DTO don't brake DRY as DTO don't have same purpose.<BR/><BR/>maybe you should read this :<BR/><BR/>http://martinfowler.com/bliki/FirstLaw.htmlPetehttps://www.blogger.com/profile/09610504958846169624noreply@blogger.com