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.