I am trying to move a legacy system which doesn't really have any architectural discipline, to abide by DDD principles. The system has payroll and invoicing processes involved so I have created a Payroll and Billing BC to reflect those boundaries.
The issue I have, which may be a modelling problem (Still new to DDD so bear with me!) is that in the current system there is a Client page.
This has some general details, some information that relates to payroll and some that relates to invoicing.
Would this be its own BC which holds all the information and communicates the payroll/invoicing related information via events, or would it be a case of have a shared kernel and associated services/repositories for managing clients?
Take this simplified model:
{
Id : 0,
Name : "",
Ref : "",
BillingAddress : {
//Address details for sending invoices to, should be in Invoicing BC
},
PayrollDetails : {
//Details relating to payroll, should be in Payroll BC
}
//Some other properties that aren't relevant in invoicing or payroll
}