Is it a bad practice to return strong typed class objects from my
If so, what is the preferred option.
SS IT Services, LLC
Re: Returning Objects
"SS IT Services LLC" <email@example.com> wrote in message
> Is it a bad practice to return strong typed class objects from my
> If so, what is the preferred option.
No. That's the preferred option, assuming you understand what it means.
Although you will be _returning_ those types, you will not be _sending_
them, and your clients will not be _receiving_ them.
When you return any type, including a primitive type like string, you will
be sending XML back to the client. In many cases, the client will
deserialize this XML into an instance of some proxy type - a type that makes
it easier for the client to access the deserialized XML. This will not be
the same type you sent, so that type will not have any of the methods of
your original type.
Also, you should not return platform-specific types, as those types may well
not exist on the platform being used by the client. In particular, do not
return DataSet or DataTable.
|All times are GMT. The time now is 08:24 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.