ObjectDataSource for non-static data = POOP

September 19, 2006 on 10:45 am | In .NET Coding |

Ok, I’ve heard people rambling off and on about how they don’t like the ObjectDataSource for this and that, but now I’m really seeing what they mean… If you don’t use a static object for the objectdatasoure’s backing source (DataTypeName) then you’re going to get an EMPTY object, freshly baked every single postback! What good is this thing? Guess they assume you will always use a static wrapper. In my case, in which the data comes from a webservice, it’s not nice for me to have to build my own static cache, do my own record locking, and maintain my own concurrency all within the asp.net process. GET REAL FOLKS! MICROSOFT FIX THIS PLEASE!

Also I’d like to know why it doesn’t cache reflection data on the target type. The obvious kneejerk answer to that might be that it’s supposed to allow you to change that type, but, I’m sure they’ve heard of hooking up change events to properties before. It’s not like it would slow things down at all… it’s already calling reflection to iterate the entire type (and it uses BuildManager.FindType() to grab the type by name from the loaded assemblies, and not only that it invokes it with Activator.CreateInstance()) Three slows don’t make a right folks. And the instantiation at each call, I STILL CAN’T BELIEVE IT! HOW STUPID IS THAT!

For a reasonable replacement, check out http://www.manuelabadia.com/products/products.aspx ($$) or a work in progress on a freer one, check out the enlightening illustration on Marc’s blog

EDIT: someone pointed out to me that I link to these guys a lot, and I should stop it.

I know it seems like I’ve been linking to Marc and Manuel a lot, but that’s because they’ve both been up to things that are very similar to the things I’m doing. It’s not that I’m obsessed or stalking them, they’ve just got good stuff to go with the issues concerning me right now. I’m sure that if you wrote something that was pertinent to my topics of discussion, and of course, were I to stumble across it, you’d be a good candidate for links as well. I’m not picky, but I can only credit those whom I know, and who have shown to be knowledgeable by example. So, in short, no I shouldn’t stop it.

No Comments yet »

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds. Valid XHTML and CSS. ^Top^