Re: Sharing binaries/code between client and server in a DDD environment

"[email protected] [domaindrivendesign]" <[email protected]>
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <[email protected]>
We're using DDD with .NET/WCF.  We have a domain layer separate from our DTO layer, like you said.  And while we have DTO versions of our entities, we also have DTO versions of our value objects and even enums In your example, we would have "OurSystem.Contract.GenderEnum" and "OurSystem.Domain.GenderEnum".   

 We also have "adaptation extensions" classes in out application layer that are .NET extension methods to convert between our DTOs and domain values.  This allows us to write code like myDto.FooValue = domain.FooValue.ToDto().  In that case, "ToDto" is an extension method defined in the application layer that takes in the domain value as the "this" parameter.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.