Hi,
I agree with Paul. I have used this practice of a "published domain" quite
alot. Some years ago I wrote a post on this and other aspects of the
architecture we are using:
http://se-thinking.blogspot.se/2012/09/ddd-on-top-of-services-ddd-inside.html
See second last section in the post.
Regards,
Jörgen
Den 22 maj 2014 18:46 skrev "Paul Rayner
[email protected][domaindrivendesign]" <
[email protected]>:
>
>
> The objects you've defined below seem to be functioning more as data
> transfer objects (DTOs) rather than value objects. Especially since you
> have them as part of your service layer, which is outside of the domain
> model, if I am understanding you correctly.
>
> If they are, in-fact, value objects in your domain model, they should be
> immutable and I would recommend you implement everything that flows out of
> that choice. In that case, I have no issues sharing them, so long as you
> adhere to the guidelines for shared kernel:
> https://domainlanguage.com/ddd/patterns/DDD_Reference_2011-01-31.pdf.
>
> Cheers,
> Paul.
>
> On Thu, May 22, 2014 at 8:18 AM, Alastair van Leeuwen
> [email protected] [domaindrivendesign] <
> [email protected]> wrote:
>
>>
>>
>> Hi,
>>
>> How appropriate is it when sharing binaries or code between a client and
>> a server in a DDD environment.
>> I by no means advocate sharing the entire Model but just certain common
>> aspects.
>>
>> For example, when using C# with WCF, it is accepted if the service
>> interfaces are shared between the client and the server.
>> What if this is taken one step further?
>>
>> For example:
>> interface ICustomerMaintenance
>> {
>> void CreateCustomer(string Name, string Surname, Sex sex, PhoneNumber
>> mobileNumber, PhoneNumber landNumber, ...);
>> }
>>
>> Sex is defined as:
>> enum Sex
>> {
>> Male, Female
>> }
>>
>> PhoneNumber is a value object defining a phone number.
>>
>> Although Sex and PhoneNumber are both Value Objects, can they not be
>> defined in some common area and shared?
>> It seems like extra complexity if these value objects must be re-created
>> on the client side.
>>
>> When sharing these domain concepts in both the client and server, is
>> there a special name for it?
>> Is it a Shared Kernel or is this term used only when integrating between
>> Bounded Context?
>>
>> There are already common value objects available in C#, such as DateTime.
>> If a DateTime did not exist in C#, surely it does not have to be
>> re-created on the client and server?
>>
>> Kind regards,
>> Alastair
>>
>>
>>
>>
>>
>>
>
>
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.