Ask a Question related to ASP.NET Web Services, Design and Development.
-
Just Me #1
Class v. Structure
Is there any performance considerations for a web service returning a
structure versus an instance of a class?
Just Me Guest
-
Class::Struct - want to access structure within structure
I want to access a structure within a structure. Below is what I had in mind. Please help. #!/perl/bin/perl use Class::Struct; struct Step... -
Hiding Abstrected Class Structure in WSDL
I’m building a simple web service that has a few functions, each returning simple data classes, structured similar to this: public class... -
#25580 [WFx]: set_error_handler to a class/method resets class properties when error occurs
ID: 25580 Updated by: sniper@php.net Reported By: paul dot liversidge at recycledpixels dot com Status: Wont... -
#25580 [Opn->WFx]: set_error_handler to a class/method resets class properties when error occurs
ID: 25580 Updated by: sniper@php.net Reported By: paul dot liversidge at recycledpixels dot com -Status: Open... -
#25580 [NEW]: set_error_handler to a class/method resets class properties when error occurs
From: paul dot liversidge at recycledpixels dot com Operating system: Windows XP PHP version: 4.3.2 PHP Bug Type: ... -
Michael Nemtsev #2
Re: Class v. Structure
Hello Just,
JM> Is there any performance considerations for a web service returning
JM> a structure versus an instance of a class?
Seems not, coz both of them need to be serialized
---
WBR,
Michael Nemtsev
Michael Nemtsev Guest
-
Just Me #3
Re: Class v. Structure
Methods do not get serialized so it would seem more straighforward,
clearer, more inutitive, etc. in reading the code to use structures.
I know in .Net, structures can have methods, but I've used them in the
past strictly for grouping relate elements/data types.
The differentiation I'm thinking of that may be pertinent to performance
is that structures are created on the stack versus on the heap for class
instances. My guess is that for small sets of data, perhaps the
structure is better and the opposite is true for returning large sets of
data. I really do not know.
I have not found any discussion of such in MSDN or otherwise. I'm
curious to know if anyone has any remotely conclusive evidence or
experience. Thanks.
Just Me Guest
-
Michael Nemtsev #4
Re: Class v. Structure
Hello Just,
JM> The differentiation I'm thinking of that may be pertinent to
JM> performance is that structures are created on the stack versus on
JM> the heap for class instances. My guess is that for small sets of
JM> data, perhaps the structure is better and the opposite is true for
JM> returning large sets of data. I really do not know.
Yep, everything is all right as u described.
it depends on how u treats that data afterwards u get them? If it's in vast
using - use class,
if it's only returning data with short period of life - use stucture.
Web-service doesnt' have sense in this way
---
WBR,
Michael Nemtsev
Michael Nemtsev Guest
-
Just Me #5
Re: Class v. Structure
Thank you for your replies and confirming my thoughts. Best regards.
Michael Nemtsev wrote:
Just Me Guest



Reply With Quote

