Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it really professional to use the data source controls in ASP.NET? [closed]

I'm in the process of learning ASP.NET. I bought some books on the subject. All of them suggest that using the data source controls, like ObjectDataSource/SqlDataSource etc. are the way to go. Now, I'm definitely not an expert on the subject, far from it actually. but I have a strong feeling that these are toy tools. I have a hard time believing that these classes would be used in a real world, enterprise grade application. Am I right? Or do these classes actually do have a place in large scale web applications?

Thanks, Avi

like image 354
Avi Shilon Avatar asked Oct 25 '09 20:10

Avi Shilon


3 Answers

These controls have gained a bad reputation due to inexpert developers using them without understanding them, and professional developers looking down on them as a result. The best advice I can give you, is that a professional will use whatever tool is the most appropriate, and which gets the job done without getting in the way. If these tools do the job for you, then you should use them and don't let people put you down for it.

like image 71
Pete OHanlon Avatar answered Oct 28 '22 01:10

Pete OHanlon


I agree with Wyatt and figured I should add a little bit more information. The problem with all the data source objects (other than ObjectDataSource) is that you are unable to split your application up into logical tiers (i.e. UI, business logic, data access). You are putting all of your data access code in your UI, and that is very bad from an architectural view of your project.

like image 32
Jason Berkan Avatar answered Oct 28 '22 01:10

Jason Berkan


I think one could argue that using ObjectDataSource is reasonable, presuming it is actually talking to a real middle-tier of objects. Especially if the developers extend ODS to play with their middle-tier.

The others will get your fingers broken (2nd offense) in my shop.

like image 36
Wyatt Barnett Avatar answered Oct 28 '22 00:10

Wyatt Barnett