Geeks With Blogs
Mike Nichols - SonOfNun Technology If I were the captain on a big steamboat...

I guess I'm confused about the ObjectDataSource control. the SqlDataSource control is a non-issue for me since I'll *never* build an app that puts a view dependency on my database schema, but I see alot about the ObjectDataSource control in the Nhibernate forum.

It's been a while since I actually wrangled with the ObjectDataSource control since I didn't see what advantage trying to get it to wireup to my model this extra control would bring to the table. What is so different about simply binding to a Repeater control? Two-way binding I suppose is the answer, but typically I communicate with a service layer on top of my domain entities since I rather protect my domain entities from upper layers, so by the time i get done wiring up the CRUD events in these new ASP.NET 2.0 controls, did I save time from simply iterating over a repeater and passing the values to the appropriate service for processing?

I'd love to see know what I'm missing since so many developers seem to be spending time extending these controls that, at least from what i can tell, expose an app's Domain layer to bad practices and creates rigid dependencies between the view and it's data source.

What you tink sensei?

Posted on Monday, September 11, 2006 1:32 PM ASP.NET | Back to top


Comments on this post: I'm sure I don't get it about the ObjectDataSource control

# re: I'm sure I don't get it about the ObjectDataSource control
Requesting Gravatar...
Mike,
Here's the scoop: the SqlDataSource is around for new developers to use to click and build their applications and for M$ to demonstrate how you can create an app in 5 seconds. The ObjectDataSource was created for those develoepers that have graduated from the two-tier click and build design but still aren't quite ready for a nicely separated, abstracted, loosely coupled (over architected :) design.

We can only look down on them and fondly remember when we were so naive and help them along by writing excellent posts on Visitor Patterns, MVP, and Domain Driven Design.

Keep the faith.
Left by Bill Pierce on Sep 12, 2006 3:42 AM

# re: I'm sure I don't get it about the ObjectDataSource control
Requesting Gravatar...
Hey Mike,

I think that the at the end of the day it comes down to the fact that a large percentage of developers are still very comfortable with the drag and drop approach to application development, and have not yet seen the value that applying some of the concepts such as patterns, test driven development and domain driven design can bring.

I took a look at the object data source control, and then continued to write an article describing exactly what you were saying. If you have gone to the trouble of introducing a rich domain with at least a presenter (maybe not a service layer), is there really any advantage that the ObjectDataSource control brings? I don't think so!!
Left by Jean-Paul S. Boodhoo on Sep 14, 2006 11:17 AM

# re: I'm sure I don't get it about the ObjectDataSource control
Requesting Gravatar...
Ditto.... ODS is teh suck. I have tried to conform my object model a few times to use it and it's cumbersome and ugly and provides little benefit.
Left by Ben Scheirman on Sep 19, 2006 6:11 AM

# re: I'm sure I don't get it about the ObjectDataSource control
Requesting Gravatar...
Glad I'm not the only one coming to the conclusion that the ObjectDataSource control is pointless.
Left by Dave on Sep 25, 2007 2:47 AM

# re: I'm sure I don't get it about the ObjectDataSource control
Requesting Gravatar...
Mike ,
I hear alot of talk on blogs and forums about the problems with the objectdatasource. What methods do you use to display the data on web apps from an oop approach?
Left by Rafiq on Dec 27, 2007 7:05 AM

# re: I'm sure I don't get it about the ObjectDataSource control
Requesting Gravatar...
I completely agree with your review of the ODS control. It - like several other controls - do little more than encourage bad application design, or lazy application design at the very least.
Left by Brian Whittington on Jul 07, 2008 2:02 PM

Your comment:
 (will show your gravatar)


Copyright © Mike Nichols | Powered by: GeeksWithBlogs.net