Any advantages?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paulo

    Any advantages?

    Hi, should I use the data components like SqlDataSource/ObjectDataSourc e? Or
    using coding by hands like below?

    Page_Load:
    ds = SqlHelper.Execu teDataset(conne ctionString, CommandType.Sto redProcedure,
    "sp_eris_wilbor _pedido_consult a", 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]

    #2
    Re: Any advantages?

    "Paulo" <eris_paulo@ter ra.com.brwrote in message
    news:%23D%232yH 2uIHA.3564@TK2M SFTNGP03.phx.gb l...
    Hi, should I use the data components like SqlDataSource/ObjectDataSourc e?
    Or using coding by hands like below?
    >
    Page_Load:
    ds = SqlHelper.Execu teDataset(conne ctionString,
    CommandType.Sto redProcedure, "sp_eris_wilbor _pedido_consult a", arParms);
    grd.DataSource = ds;
    grd.DataBind();
    >
    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...


    --
    Mark Rae
    ASP.NET MVP


    Comment

    • Jordan S.

      #3
      Re: Any advantages?

      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/articl...tractions.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" <eris_paulo@ter ra.com.brwrote in message
      news:%23D%232yH 2uIHA.3564@TK2M SFTNGP03.phx.gb l...
      Hi, should I use the data components like SqlDataSource/ObjectDataSourc e?
      Or using coding by hands like below?
      >
      Page_Load:
      ds = SqlHelper.Execu teDataset(conne ctionString,
      CommandType.Sto redProcedure, "sp_eris_wilbor _pedido_consult a", arParms);
      grd.DataSource = ds;
      grd.DataBind();
      >
      Any pros/cons using one over other? What you suggest?
      >
      Thanks
      >
      VS 2005 asp.net 2.0 C#
      >
      >
      >
      >


      Comment

      Working...