Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / May 2008

Tip: Looking for answers? Try searching our database.

Any advantages?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paulo - 21 May 2008 17:42 GMT
Hi, should I use the data components like SqlDataSource/ObjectDataSource? Or
using coding by hands like below?

Page_Load:
ds = SqlHelper.ExecuteDataset(connectionString, CommandType.StoredProcedure,
"sp_eris_wilbor_pedido_consulta", arParms);
grd.DataSource = ds;
grd.DataBind();

Any pros/cons using one over other? What you suggest?

Thanks

VS 2005 asp.net 2.0 C#
Mark Rae [MVP] - 21 May 2008 18:19 GMT
> Hi, should I use the data components like SqlDataSource/ObjectDataSource?
> Or using coding by hands like below?
[quoted text clipped - 6 lines]
>
> Any pros/cons using one over other? What you suggest?

It really comes down to personal preference.

I never go anywhere near the DataSource objects because I prefer to use my
own DAL.

For the same reason, I never use the Validation controls because I have my
own set of JavaScript validation routines which give me much more control...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Jordan S. - 22 May 2008 07:58 GMT
The data components like many included components are like training wheels
on a child's bicycle. They are helpful when first learning, but as soon as
you know the basics, then they only get in the way.

with hand-coding you get more control, plus when something goes wrong you
*can* fix it and don't have to deal with a broken black box that is the
pre-packaged component.

The Law of Leaky Abstractions
(http://www.joelonsoftware.com/articles/LeakyAbstractions.html) is relevant
to your question. Components abstract many details in an effort to help you,
but you need to understand the underlying realities once things go wrong.

-HTH

> Hi, should I use the data components like SqlDataSource/ObjectDataSource?
> Or using coding by hands like below?
[quoted text clipped - 10 lines]
>
> VS 2005 asp.net 2.0 C#

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.