Object architecture question

Scenario:

I am building our order processing system. I have an Order object that will contain a Generics list of Invoice and PurchaseOrder objects. I'm sure I would include a Customer object in an Order object, but then I'm wondering how to access it from Invoice / PurchaseOrder objects. It makes no sense for every Inv / PO to contain an identical copy of the Client.

What should I do? Put a copy of the Client in an Inv and PO object and an Order object? Or just the Order? Or am I making it too hard?

Thank!

0


source to share


1 answer


What language do you write in?

In .NET, you could refer to the same client object from all other objects. Not a copy, but a reference to the same object. But I can easily imagine that something like this might not be possible due to your business structure.



What are you using?

+1


source







All Articles