Hi Alan,
I am working as part of a team , who are developing a GUI front-end for a database.
Now, we have created many business objects: Customer, Part, Product code, etc. These objects all know how to render themselves on the screen, as well as retrieve the data they depend on from the server. All's well and good.
When we have complex business objects, eg Order, we make this object out of the many simpler ones we already have:
Class Order { Customer cust; Part[] parts; (etc) }
The only problem we have , is that some of the data for the customer object, within the order object, isn't actually where the customer object thinks it is. In the case of an order, some of the customer information is stored on the order file, instead of the customer file.
Unfortunately, when we display the order, the customer info is shown from the customer file, not the order file........
The only way around this, We can think of, is by providing 'set' methods on the customer object, that will allow the order object to specify the correct values that need to be shown. This would strongly couple the order and customer objects together. Any ideas how to get around this?
Thanks.
|