Rocky Lhotka on DataSets and Web Services and why I think he's wrong...

After reading Rocky's blog about DataSets and Web Services, I am afraid that he is falling into the same trap that other's have (including the emminently qualified Tim Ewald) with respect to DataSets.  DataSets work well in Web Services but not by default.  As I mentioned in:

http://wildermuth.com/content.aspx?id=rantview&rantid=7

The reason I like DataSets across Web Services so much is simple.  On my side of the interop wall, I can treat them like a set of data-centric objects.  But when I expose them via Web Services, I can treat the entire DataSet as a document.  I like doc-literal web services.  The magic here lies in the fact that the schema of the DataSet can be simply described with XSD.  In fact, for non-typed DataSets that can be described inline with WriteXmlSchema() (so it can be interpreted on the other side of the interop wall). 

For typed DataSets it gets even better.  An XSD is the source of Typed DataSets, so exposing your XSD to describe your 'document' is a natural way of doing things.  In fact, if you're not using ?wsdl for your .NET web services (which you shouldn't!), you can refer to the .xsd to describe the types that your web service expose.

I am passionate about this because creating web services to banty around your business objects is fine, but seems wholly unnecessary.  I hope I can get Rocky to see the light.

Addendum:

I love Sahil's discussion of this too:

http://dotnetjunkies.com/WebLog/sahilmalik/archive/2005/01/23/47832.aspx

Comments:

Dude, how did I not know of your blog :))).

Subscribed !!

"Server Error in '/' Application." on your link to yourself :)

Keith,

I can't do much about the server error :(. DNJ is hella buggy 'mfraid !!

Keep refreshin' the content over there is worth the pain :).

RSS Works better than HTML though.

- SM

Oh wait .. I think you were talking about the ado guy's link .. sorry !! :)

Good point Shawn. Though the issues of encapsulation and versioning are still very important

http://www.lhotka.net/WeBlog/PermaLink.aspx?guid=bee605ea-289a-4a39-9331-6df5e27909fd

I let my inner Demon out so he can shake up this hornets nest...

http://www.cerkit.com/cerkitBlog/PermaLink,guid,ba2d5211-f158-43a1-879e-700e82e5008d.aspx

Yes, sorry, Shawn's link is the one giving an ASP.NET runtime server error... not yours Sahil.

The link should be fixed...

I agreeeeeeee! You just gained another subscriber to your blog. Those of us that have to program in the real world do not have time to create objects to the same thing that a database was built to do.

Correction to my previous post: I meant "to do the same thing a dataset was built to do"


 



 
Save Cancel