Monthly Archives: February 2004

Whidbey System.Data: Some new methods and a class

Since System.Data does not fit into the scope of my BCL talk and I LOVE ADO.NET and LOVE some of the new things in System.Data, I thought I would point them out here quickly for anyone who hasn’t seen it yet.

More user of DataReader
DataSet.GetDataReader
DataSet.LoadfromDataReader
 
So when you want the benefit of minimal stress on your resources(=datareader) yet the ability to pass data objects around (datareader can cause problems), you can now get the best of both worlds. Grab a datareader, shove it into a dataset and go.
 
DataTables are People, Too!!
DataTableReader class
DataTable.Load  (from DataReader)
 
DataTable gets XML
DataTable.ReadXML
DataTable.WriteXML
DataTable.WriteXMLSchema
Oh baby oh baby oh baby! THANK YOU FOR THIS! Need I say more?
 
Merging
DataSet.Merge
DataTable.Merge
These let you pull together datatables, datarows, etc.
 
A little more help with exceptions:
DataAdapterException
 
And for the really meticulous coder
DataSet BeginInit and EndInit
 
If you don’t have whidbey and the help file, you can see some of this stuff in the online longhorn sdk.  Just be sure to note where you are looking at stuff that IS in Whidbey and stuff that is not here until longhorn.
 
I’m so sad because I had to delete these from my deck.

WinFS discussion

I followed the trail from Simon Fell’s post questioning WinFS then followed it to Robert Scoble’s response and then Dare Obasanjo’s response to that as well as a bunch of discussion in his comments. And I wanted to add my 2 cents.

I agree with Dare that Microsoft keeps using the “organizing my pictures“ example and that is not satisfying. And I smile at his reference to Hailstorm. Hailstorm terrified me. It was the reason I spent 3 months playing with JBuilder before I came crawling back to .NET. I saw Hailstorm as some kind of James Bond movie plot to take over the world. But I digress. Back to WinFS.

From a very narrow view, here is an example of what I am hoping for:

In Outlook I have appointments, emails and notes. I would like to be able to see all notes emails and appointments that are related. Naturally, in a folder oriented world, I wanted to be able to drag my notes into the same folders where my emails are organized. I can’t. When Outlook 2003 came out it was the first thing I looked for. (Maybe it’s there and I haven’t found it yet… Kase??) Of course there are CATEGORIES that I could use – but as everyone is pointing out as a big issue with WinFS – I don’t want to use them! It’s too much work. I can’t categorize a folder so I would have to categorize every email that is of interested. No thanks. I just want to drag my note into the darned email folder and be finished.

Somehow, I have this idea (is this a fantasy?) that WinFS will make this easier (or enable programmers to make this easier for end-users), i can “categorize/meta tag“ my stuff with the ease of dragging and dropping into a folder and stuff can be emails, outlook notes, some documents, blog posts, etc.

That’s what I got excited about when I saw WinFS at PDC. Of course, I didn’t stop and think about how I was going to get lazy (well, busy) me to do whatever is necessary (creating the meta tags) to make all of this work.

Two extremes of the architect syndrome

Thanks to Chris Anderson, I was pointed to Michael Earl’s great post on something that I know *I* go through a lot and surely many of us do all of the time.

He talks about the Purist architects “cringes when you design a UI with business logic in it” vs. the Realist  who “has an acute awareness of the importance of puritanism, but also knows that the business is in the business to make money, not to pay for “perfect” software systems.”

Michael also states: “While neither of these two behavioral patterns is wrong, I believe that there exists a shiny bright place halfway between them where a good architect, engineer, or developer should strive to reside. “

Not 10 minutes ago I posted an email on the aspnet-architecture (AspAdvice) list asking a question that exposes my own struggle between these two bents.

The worst part of this for me is that a) I work alone and b) I’m a Libra (known for extensive self-debating).