Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / September 2003

Tip: Looking for answers? Try searching our database.

Most efficient way to return multiple values to client

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Hetrick - 28 Sep 2003 04:03 GMT
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.)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.