dragonwell
Programmer
Continuting on the topic in thread678-1014576
We are going to have a Customer business object, and a serializable CustomerDTO data-transfer-object. A CustomerService class with a method like ListCustomers that returns a list of CustomerDTOs to the presentation layer.
How exactly does a CustomerDTO instance get created from a Customer business obejct? Is it just through brute force - go through each property and set the data, or is there some trick using meta-data or something? At worst the CustomerService gets a list of Customers from the business layer, loops through it and creates new CustomerDTOs and puts them in a new list and returns it. Is that the typical way?
Thanks
We are going to have a Customer business object, and a serializable CustomerDTO data-transfer-object. A CustomerService class with a method like ListCustomers that returns a list of CustomerDTOs to the presentation layer.
How exactly does a CustomerDTO instance get created from a Customer business obejct? Is it just through brute force - go through each property and set the data, or is there some trick using meta-data or something? At worst the CustomerService gets a list of Customers from the business layer, loops through it and creates new CustomerDTOs and puts them in a new list and returns it. Is that the typical way?
Thanks