A little disappointed by the DataSet API
as you can see by the subject, I'm not very happy about the above API... after working for a bit in an ASP.NET project, using ADO.NET, I just fainted when I saw the API.
Now, I think I should explain. The API is very good for SQL oriented guys, that would just use rowsets, and in fact I should say it's better than ADO.NET, since it supports joining out of the box (in ADO.NET there is no direct way to ask for a joined view, unless you perfom the join against the database, of course).
Yet, I'm not that kind of guy. I like object models, data and behaviour put togheter in the same place, object graphs with real relations. I guess it's a matter of taste, but working with DataSet just makes me go back into my Visual Basic days (oh, the horror), with data on one side, user interface on another, and the logic sprinkled all over in the user interface itself and/or in function libraries.
I see that DataRow can wrap an isolated Bean, but in my opinion it cannot wrap an object graph. With beans, you don't have a predefined structure, the set of properties that you can extract thru property chaining, like Person.Address.City.inhabitants, for exaple, is not endless but for sure quite big. Moreover, some paths can be forbidden, in a sense that some collection or properties can be lazy loaded, and unavailable on the client side (that's what happens with Hibernate, that I use, and I guess also with JDO and iBati)
What I mean, is that object graphs does not fit with the DataSet API. Yes, you can try to hammer an object graph into a DataSet, creating a DataRelation for each property that points to another bean, hammering togheter lists attached to different beans in order to re-create a two table relation, but it would be awkward in my opinion.
I'm working part time on a data binding and validation library especially conceived for beans, and I would like to share it if you want to see it (as soon as I hammer down some details and add some javadoc, it's still not ready), but before I would like to hear your opinion.
Mine is that the DataSet API is very good for SQL oriented operations, but it's no silver bullet, and should not be used for everything (especially for object graphs).
Comments, opinion, even flames are accepted :-)