views:

31

answers:

2

Abstract example: If I have a system with domains of "Fleet" containing a "Vehicle" class, and "Customers" containing a "Driver" class, where would you place a joining class (which would detail lifecycle, insurance claims, and other information about the relationship)? Fleet and Customer concerns are equally important to the system and views on the relationship from both directions will be made.

Fleet.DriverHistory?

Customers.VehicleHistory?

MyVagueGeneralRelationshipNamespace.VehicleDriverHistory?

Other?

A: 

I don't think it needs to be a Vague relationship. The vehicle allocations may be "abstract" in the sense that you can't touch them, but in a business sense they are "real", in fact they are pretty much the whole reason for the business. So I'd have a domain "Rental" or some such, which can have your two histories.

djna
Ok, so another domain for each joining relationship in the system. I see your point but that's going to get weighty isn't it?
annakata
Also: I didn't mean the relationship was vague, just my label for the namespace :)
annakata
I don't think it's a domain per relationship, but per concept. So driver history of rented vehicles and vehicle history of who rented me are both part of the Rental domain, and perhaps that even includes invoices and bookings too. But for example vehicle repairs would be a whole other domain.
djna
A: 

I think some kind of record class independent of both two classes is definitely the way to go, ie

MyVagueGeneralRelationshipNamespace.VehicleDriverHistory

Tomas Cokis