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
MSFT - 29 Sep 2003 06:59 GMT
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

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Michael Hetrick - 30 Sep 2003 03:40 GMT
Thanks. Is it more of a code readability convention or is it really more
efficient?
Michael
> Hi Michael,
>
[quoted text clipped - 15 lines]
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
MSFT - 30 Sep 2003 12:22 GMT
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

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)