DDD and cross domain AR references for UI

"[email protected] [domaindrivendesign]" <[email protected]> 26 Jul 2015 17:10:21 -0700
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <[email protected]>
This question relates to discovering other representations of an AR across multiple BC's.

This is an entirely made up example but I hope makes my question clear.

Let's imagine some sort of site where people book tickets to shows but also share and socialise.

In one BC I have everything to do with tickets and booking shows. The user is represented as a relatively light object: TicketHolder

In a 'social' BC I have a richer representation of a User with profile information and relationships to other users.

One day we decide that a Company can be a TicketHolder. The DDD approach really helps us because the Ticket BC doesn't need to change in the case. Big win!

However in our UI there is a page that shows the information on a purchased Ticket that includes the TicketHolder. We have decided we would like to be able to click on the TicketHolder link and go to the User or Company's full profile.

When the TicketHolder is created in the Ticket BC we could add a 'type' which is a string ('company' | 'user') and return that back into the UI and juggle the type with some RESTful endpoints - but that seems brittle :(

Does anyone have any pointers? I'd be most grateful. Either technically (i.e. some sort of URN/HATEOS/ discovery system) or perhaps from a modelling perspective (i.e. you're modelling it wrong!).

Best regards,
Doug