The old ArrayList or DataSet Question:
I personally like to deal with ArrayLists of objects only.
Using my crude O/R mapper (actually, not that crude, its pretty fast...) (which will be part of the task vision project, in its own dataprovider), all you need to save an object, update an object, get an arrayList of objects, delete an object is supply one attribute (and subclass for now :( ) and you automatically have the methods...
task1.Save(); task1.Delete();
task1.GetAllTasks();
task1.GetAllTasks(int projectID);
(the last two lines show one of my O/R mapper's weaknesses right now.
Dealing with DataRows adds alot of complexity, and assumes I know how the database is structured and that the column names will never get changed by the DB admin.
Now, lets say I want to send an arrayList of Tasks - not locally, but across the wire!
DataSets are the way to go.
I'm thinking, I will want to add support (easy...) to turn an object into a datarow, a datarow into an object, an arrayList of objects into a Dataset, and a Dataset into an arrayList of objects.
How to handle sending only the Tasks that need to be updated?
JDog, or anyone else, this is probably the most interesting topic for me (and ALOT of other people) . Please post your feedback!
Is there a way to have your cake and eat it too? Can we deal with ArrayLists of objects AND DataSets? I think there's an efficient way. You know how long it took me to write a TaskVision Mod Before I used an o/r mapper (weeks) and after? (hours).
|