Most efficient way to return multiple values to client

Discussion in 'ASP .Net Web Services' started by Michael Hetrick, Sep 28, 2003.

  1. I'm writing an Active Directory web service and need to return multiple
    properties of a single user. The web service receives the username and
    looks up the properties of the user in Active Directory. This works fine.

    If I look-up the first name, last name, email, telephone, city, state, and
    zip, should I create a dataset or create a user object in the service to
    return to the client? I am looking for the most efficient way to do this -
    an on-the-fly dataset or serialization/deserialization of a user
    class/object.

    Thanks-
    Michael
     
    Michael Hetrick, Sep 28, 2003
    #1
    1. Advertising

  2. Michael Hetrick

    MSFT Guest

    Hi Michael,

    I prefer to create a new class in web service to return the info about a
    user. DataSet also need to be serialization/deserializtion from webservice
    to client. When programming on client side, it is more clear and easy to
    use with a class than a dataset. For example:

    MyUser.Telephone

    VS

    MyDataset.Tables("MyUsers").rows(1)("Telephone")


    Luke
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    MSFT, Sep 29, 2003
    #2
    1. Advertising

  3. Thanks. Is it more of a code readability convention or is it really more
    efficient?

    Michael

    "MSFT" <> wrote in message
    news:...
    > Hi Michael,
    >
    > I prefer to create a new class in web service to return the info about a
    > user. DataSet also need to be serialization/deserializtion from webservice
    > to client. When programming on client side, it is more clear and easy to
    > use with a class than a dataset. For example:
    >
    > MyUser.Telephone
    >
    > VS
    >
    > MyDataset.Tables("MyUsers").rows(1)("Telephone")
    >
    >
    > Luke
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
     
    Michael Hetrick, Sep 30, 2003
    #3
  4. Michael Hetrick

    MSFT Guest

    Hi Michael,

    I mean code readability in my previous email. With Datset, you may need
    more code on client side; With a class, you may need more code on server
    side. Regarding the efficent, I think there is no big difference between
    them.

    Luke
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    MSFT, Sep 30, 2003
    #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. Brent Minder
    Replies:
    3
    Views:
    417
    Brent
    Dec 28, 2003
  2. Peter
    Replies:
    1
    Views:
    384
    Steve C. Orr [MVP, MCSD]
    Nov 9, 2004
  3. Linus Nikander
    Replies:
    5
    Views:
    562
  4. Razvan
    Replies:
    11
    Views:
    549
    Dale King
    Oct 12, 2004
  5. davout
    Replies:
    0
    Views:
    361
    davout
    Oct 28, 2004
Loading...

Share This Page