Any advantages?

Discussion in 'ASP .Net' started by Paulo, May 21, 2008.

  1. Paulo

    Paulo Guest

    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#
     
    Paulo, May 21, 2008
    #1
    1. Advertising

  2. Paulo

    Jordan S. Guest

    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



    "Paulo" <> wrote in message
    news:%23D%...
    > 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#
    >
    >
    >
    >
     
    Jordan S., May 22, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Punya Narra
    Replies:
    5
    Views:
    1,715
    Itai Raz
    Feb 17, 2004
  2. valentin tihomirov

    Advantages of denying keywords as identifiers

    valentin tihomirov, Dec 17, 2004, in forum: VHDL
    Replies:
    8
    Views:
    519
    Mike Treseler
    Dec 28, 2004
  3. John South

    advantages of moving to asp.net

    John South, Apr 1, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    533
    Peter Blum
    Apr 1, 2004
  4. Kevin Spencer

    Re: ADO Connection Advantages

    Kevin Spencer, Aug 4, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    437
    Kevin Spencer
    Aug 4, 2004
  5. Adam Lipscombe
    Replies:
    11
    Views:
    12,710
Loading...

Share This Page