More Perplexed by .NET 2.0

March 22, 2005
No Comments.

I spent most of the evening pondering a problem that I heard about from Jesse Liberty (author of a number of O’Reilly .NET books).  Admittedly, I haven’t spent as much time with ASP.NET 2.0 as I would have liked, so I got down to writing a website with the SqlDataProvider object.  Wow, it hides everything.  While this will get the small site up and running very fast, I am afraid it will point people are creating lots of single resultset queries.  Back to ADO land.

Ok, but what if you want to use a DataSet to hold hierarchical data?  Well, the DataSet and DataAdapters not only are not on the Data Palette (like they should be), but for some reason you can’t even add them manually.  The only way I could get this to work was to create a DataSet in a separate project (yes, a separate project) and reference that project from the Web Project.  Even so, I was still left with creating a Typed DataSet and a Component for the Adapters like I do in 1.x.  If they are going to add the idea of a TableAdapter to the Typed DataSet (good idea guys), we also need allow DataAdapters to be added to the Typed DataSet.  Why?  Because retrieving your data one table at a time is a bad practice.  Again, DataAdapters do a good job of retrieving batch resultsets and mapping them to an entire Typed DataSet object.

I know there was a lot of blowback about the traditional single resultset bunch who were used to working a certain way.  Allow the case where a single resultset is needed is a great step forward, but don’t erase the larger case to meet that demand.  Please…

Maybe the strategy continues to be, “Don’t use Typed DataSets…go back and create Data Libraries of Objects”.  Please don’t give us tools and then take them away when we’re finally getting good at them.