(Apologies for the relative lack of posts, I’m working on something brand new which I hope to be able to share with the community in the coming month…stay tuned).
Warning: this might come out as a ramble of thoughts….
I was doing some light research tonight about domain layers and dataset, when I came across a promising (j/k) hit on Google titled
DataSets Suck by Jacob Proffitt. I figured this was just the kinda FUD I needed.
I was surprised to see my own name come up and a link to my How to Hire a Programmer post. Reading the post, Jacob is obviously a really smart and open minded guy. His very last sentence was a little rough, but even so, I think he’s dead on (about the last point and everything else as a whole).
Jacob doesn’t like that we “real” (his word, not mine…I think) hate datasets but never give concrete reasons why. Part of my hatred does come from personal experience where a complex system, with DataSets as the foundation, was totally molested.
The real reason though is actually much more complex and not really related to DataSets as a technology at all. You see, DataSets are just too damn easy and programmers too damn lazy. Unlike Larry Wall, I’ve long stopped believing that laziness is a sign of a good programmer. I advocate against the use of DataSets as a counterbalance to people who blindly use them.
There are many situations where DataSets are a very useful tool, and many ways in which to leverage them in other situations where they might not be the go-to technology. But it requires knowledge and experience to make that decision and far too many developers stopped acquiring either after reading their first .NET reference book. Object-impedance mismatch is something developers should understand as are O/R mapping, OOP, N-Tier and domain drive design.
So yes, Jacob is right; my complaint isn’t with DataSets, but the abuse of DataSets, not knowing about alternatives and their pros/cons. The same could be said about almost any technology (like exceptions, string formatters, http handlers, codebehind and so on). For its part, I think Microsoft has been responsible for the lack of education, yet I’m hopeful LINQ will start to change that.
I hope the pro-DataSet people appreciate my position and understand my attitude. I think most knowledge DataSet proponents would agree the pendulum often swings too far their way.