Typed Datasets and ObjectDataSource - clever solution to the scalarparameters problem?

Discussion in 'ASP .Net' started by JimLad, Nov 27, 2009.

  1. JimLad

    JimLad Guest

    Hi,

    VS2008

    We've got a CRUD app of about 300 pages with very little business
    logic. As such we intend to mostly use typed datasets with a few
    custom objects thrown in. Will be using Gridview, Detailsview,
    Formview, Listview etc on the UI.

    We need to connect the datasets to the UI through the BLL. Everyone
    seems to use ObjectDataSource for this. The very obvious limitation of
    this is that data modifications have to pass values as scalar
    parameters, rather than as typed datarows. This seems pretty horrible
    to me and I am no OO purist!

    So my real question is what did Microsoft intend us to do in this
    situation and what do people do in this situation. Passing scalar
    values through the BLL is so completely horrible!

    I know this is old news, but I haven't seen a decent solution/
    workaround!

    Cheers,

    James
     
    JimLad, Nov 27, 2009
    #1
    1. Advertising

  2. JimLad

    JimLad Guest

    Re: Typed Datasets and ObjectDataSource - clever solution to thescalar parameters problem?

    On Nov 27, 1:04 pm, JimLad <> wrote:
    > Hi,
    >
    > VS2008
    >
    > We've got a CRUD app of about 300 pages with very little business
    > logic. As such we intend to mostly use typed datasets with a few
    > custom objects thrown in. Will be using Gridview, Detailsview,
    > Formview, Listview etc on the UI.
    >
    > We need to connect the datasets to the UI through the BLL. Everyone
    > seems to use ObjectDataSource for this. The very obvious limitation of
    > this is that data modifications have to pass values as scalar
    > parameters, rather than as typed datarows. This seems pretty horrible
    > to me and I am no OO purist!
    >
    > So my real question is what did Microsoft intend us to do in this
    > situation and what do people do in this situation. Passing scalar
    > values through the BLL is so completely horrible!
    >
    > I know this is old news, but I haven't seen a decent solution/
    > workaround!
    >
    > Cheers,
    >
    > James


    Anyone?
     
    JimLad, Nov 29, 2009
    #2
    1. Advertising

  3. JimLad

    Patrice Guest

    Re: Typed Datasets and ObjectDataSource - clever solution to the scalar parameters problem?

    Hi,

    Hoping someone more familiar with this will help...

    I've never been a big fan of typed datasets but if I remember you can choose
    the Update style either by providing parameters for each value (is this what
    you are talking about ?) or by providing a single object. See :
    http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/data/objectdatasource.aspx

    Can't you do that with typed datasets ?

    For now I'm using Linq but DynamicData could be perhaps also helpfull
    (http://www.asp.net/(S(ywiyuluxr3qb2dfva1z5lgeg))/DynamicData/). Note that
    thought it builds your site from the schema, you can still create and
    personnalize all this i.e what you get out of the box is just the default,
    you are still free to customiez the result at will...

    --
    Patrice


    "JimLad" <> a écrit dans le message de
    news:...
    On Nov 27, 1:04 pm, JimLad <> wrote:
    > Hi,
    >
    > VS2008
    >
    > We've got a CRUD app of about 300 pages with very little business
    > logic. As such we intend to mostly use typed datasets with a few
    > custom objects thrown in. Will be using Gridview, Detailsview,
    > Formview, Listview etc on the UI.
    >
    > We need to connect the datasets to the UI through the BLL. Everyone
    > seems to use ObjectDataSource for this. The very obvious limitation of
    > this is that data modifications have to pass values as scalar
    > parameters, rather than as typed datarows. This seems pretty horrible
    > to me and I am no OO purist!
    >
    > So my real question is what did Microsoft intend us to do in this
    > situation and what do people do in this situation. Passing scalar
    > values through the BLL is so completely horrible!
    >
    > I know this is old news, but I haven't seen a decent solution/
    > workaround!
    >
    > Cheers,
    >
    > James


    Anyone?
     
    Patrice, Nov 29, 2009
    #3
  4. JimLad

    JimLad Guest

    Re: Typed Datasets and ObjectDataSource - clever solution to thescalar parameters problem?

    On Nov 29, 9:17 pm, "Patrice" <http://scribe-en.blogspot.com/> wrote:
    > Hi,
    >
    > Hoping someone more familiar with this will help...
    >
    > I've never been a big fan of typed datasets but if I remember you can choose
    > the Update style either by providing parameters for each value (is this what
    > you are talking about ?) or by providing a single object. See :http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/data/obje...
    >
    > Can't you do that with typed datasets ?
    >
    > For now I'm using Linq but DynamicData could be perhaps also helpfull
    > (http://www.asp.net/(S(ywiyuluxr3qb2dfva1z5lgeg))/DynamicData/). Note that
    > thought it builds your site from the schema, you can still create and
    > personnalize all this i.e what you get out of the box is just the default,
    > you are still free to customiez the result at will...
    >
    > --
    > Patrice
    >
    > "JimLad" <> a écrit dans le message denews:...
    > On Nov 27, 1:04 pm, JimLad <> wrote:
    >
    >
    >
    >
    >
    > > Hi,

    >
    > > VS2008

    >
    > > We've got a CRUD app of about 300 pages with very little business
    > > logic. As such we intend to mostly use typed datasets with a few
    > > custom objects thrown in. Will be using Gridview, Detailsview,
    > > Formview, Listview etc on the UI.

    >
    > > We need to connect the datasets to the UI through the BLL. Everyone
    > > seems to use ObjectDataSource for this. The very obvious limitation of
    > > this is that data modifications have to pass values as scalar
    > > parameters, rather than as typed datarows. This seems pretty horrible
    > > to me and I am no OO purist!

    >
    > > So my real question is what did Microsoft intend us to do in this
    > > situation and what do people do in this situation. Passing scalar
    > > values through the BLL is so completely horrible!

    >
    > > I know this is old news, but I haven't seen a decent solution/
    > > workaround!

    >
    > > Cheers,

    >
    > > James

    >
    > Anyone?- Hide quoted text -
    >
    > - Show quoted text -


    Hi Patrice,

    Thanks - I'm aware of that - the problem is that ObjectDataSource
    can't use a Typed Dataset Row as there is no parameterless
    constructor.

    Most of our code is in stored procs at the moment and there are a lot
    of joins etc. Rewriting everything in LINQ (we are all very good TSQL
    coders) doesn't seem very appealing.

    Anyone else got any other thoughts on the original question?

    Cheers,

    James
     
    JimLad, Nov 30, 2009
    #4
    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. Rob Thomas
    Replies:
    3
    Views:
    383
  2. Big D

    Strongly typed datasets and XML

    Big D, Feb 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    462
    bruce barker
    Feb 17, 2004
  3. Sparky
    Replies:
    0
    Views:
    414
    Sparky
    Nov 15, 2004
  4. Duncan Welch

    Strongly typed datasets and nested repeaters

    Duncan Welch, Apr 7, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,038
    MattC
    Apr 7, 2005
  5. Annie
    Replies:
    0
    Views:
    356
    Annie
    Nov 22, 2006
Loading...

Share This Page