Hello everyone: I am experimenting with the following design for collections of objects.
I have a class that has a field containing a datatable. The class has a method that returns a copy of the datatable to the client. The class also has a method that takes an array of primary keys and instantiates objects from the data in the datatable field. This objects are stored in an ArrayList field. The idea is to get the benefits of a domain model approach without sacrificing much in the way of performance. Objects are only created when needed. Thus, if a client only wishes to view data, then no objects are created. If a client wishes to act on the data, only the desired objects are created. I must confess that I have not experimented very much with using a table module approach that the dataset seems to be designed for. (By table module I mean a single object for all the behaviour on a table.) I am concerned that such an approach would result in more confusing code when there is complex business logic involved. Any comments would be greatly appreciated. thanks, Greg You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.