Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Not every website is Match.com

In my post yesterday there were some interesting comments about the code sample I posted regarding the use of StringBuilder vs. straight concatenation. Yes, I created a ridiculous scenario that would probably not ever occur in real life, but the intention was to illustrate a point.

David Hayden made the comment that, "Not every website is Match.com." I totally agree with that, and I especially take issue with the thing about stored procedures always being "right." The code sample is for my book, and it comes with a liberal disclaimer that such a situation is fairly extreme. (And oh yeah, I argue against the use of sprocs too as the "right" thing.)

That's one of the hardest things to confront when you're trying to teach. Do you go with the ultimate best practice when there's an easier way that doesn't perform as well but is still adequate? I've never used any kind of drag-and-drop data access because I fear for its performance, but clearly it's adequate for someone out there or Microsoft wouldn't keep including it.