Fog Creek Software
Discussion Board




Great Article on Typed Datasets


http://www.15seconds.com/issue/030401.htm

I'm still in awe of how this works (and how buried the concept is). Basically, by dragging a table from the server browser in the .Net IDE to a component canvas, working through two wizards, and writing about ten lines of code you get an object that represents the table, with properties for the fields. *All* the ADO stuff is buried inside generated code and uses generated parameterized stored procedures. It's also built to handle concurrency issues and relationships.

This is a serious "oh COOL" thing.

Disclaimer: The author is a friend of mine. But the concept still has a high cool factor. :-)

Philo

Philo
Monday, April 07, 2003

The .NET IDE is a wonderful thing indeed isn't it?  I love the productivity increase from Visual C++ 6.0.  My favorite feature of the IDE is the ability to collapse regions of code. 

It makes those long single file pages easier to navigate.  I know, I know .... if a source page is more than a few pages long then I should consider breaking the code up into smaller source files -- but I'm too lazy as usual especially in the face of impending deadlines.

HeyMacarana
Tuesday, April 08, 2003

Hey Philo,

It's a pretty good article. Basically echoes the TaskVision way of doing things. Makes pretty good sense to me. Although,  I find it easier to create typed datasets by simply dragging the table onto the dataset designer rather than generate them from the data adapter. It's one drag compared to a couple of clicks, so it's six of one yada yada.

A tip for anyone: Don't directly use the dataset classes if you need to make changes, inherit from the automatically generated ones and make your changes in those. That way, if you need to recreate them, you don't lose your changes.

Geoff Bennett
Tuesday, April 08, 2003

You can also do a similar thing with XSD.

Add a new XSD item and drag tables from the server explorer onto the canvas. Examine the code pane of the XSD and there is the schema! In all its lovely splendour.

Obviously it has been polluted with MS data descriptions, but you can get rid of those easily enough with a transform.

Justin
Tuesday, April 08, 2003

With respect to collapsing sections of code, Dave Winer says that this need led him to invent the outliner:

http://dave.editthispage.com/outlinersProgramming

Reginald Braithwaite-Lee
Tuesday, April 08, 2003

"You can also do a similar thing with XSD."

Does it create the actuall typed classes as well?

Geoff Bennett
Tuesday, April 08, 2003

Reginald: Interesting read about the outliner.  I didn't know that even though I usually try to keep up with what Dave's done and is doing -- although I stopped reading after he started getting whiny about Google purchasing Blogspot instead of his company Radio.

HeyMacarana
Tuesday, April 08, 2003

Re: the XSD - there's a command-line tool called XSD.exe which is part of the free SDK which does all of the typed-DataSet generation, so it's not a VS.NET-specific thing. VS.NET makes it easy to create the schemas in the first place though :-)

Duncan Smart
Wednesday, April 09, 2003

Macarana - Microsoft has finally discovered folding? The JED editor, amongst other, has had this for ages.


Wednesday, April 09, 2003

Ah, ok. So you develop the schema, drop to the command line and lauch xsd to generate the class.

Geoff Bennett
Wednesday, April 09, 2003

*  Recent Topics

*  Fog Creek Home