How to serialize object and methods?

  • Thread starter Thread starter GoodMorningSky
  • Start date Start date
G

GoodMorningSky

I have long term question about object serialization.
Object serialization is used in many ways.
In .net I heard XML is used for object serialization. I understand how
object values are serialized and read many books about it.

But, I don't understand how those methods are serialized?
Are instance methods serialized? I think it does so, remoting object method
call is possible.
If so how the method is serialized? Instance values are just data. But
method is sequential steps for execution. How this is serialized and
delivered to other computer?

I want to know how the methods are serialized and de-serialized, and how the
actual performance work?

Thank you..
 
What do you envisage happening when a method is serialized?

Only state (data) is serialized, the methods are part of the type definition and so are availble within the assembly. Its the state which is transient unless serialized. I suppose you could argue that the methods are permanently serialized in the form of the assembly byte stream (I known I am ignoring transient assemblies created via Reflection.Emit before anyone picks me up on it)

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

I have long term question about object serialization.
Object serialization is used in many ways.
In .net I heard XML is used for object serialization. I understand how
object values are serialized and read many books about it.

But, I don't understand how those methods are serialized?
Are instance methods serialized? I think it does so, remoting object method
call is possible.
If so how the method is serialized? Instance values are just data. But
method is sequential steps for execution. How this is serialized and
delivered to other computer?

I want to know how the methods are serialized and de-serialized, and how the
actual performance work?

Thank you..



[microsoft.public.dotnet.languages.csharp]
 
Thank you for the comment.
You means the methods (including instance and static) are never serialized.
Then my question should turn to this question.
Using web service or remoting API, the remote method is visible from remote
environment.
How the remoting call to remote object works?


Richard Blewett said:
What do you envisage happening when a method is serialized?

Only state (data) is serialized, the methods are part of the type
definition and so are availble within the assembly. Its the state which is
transient unless serialized. I suppose you could argue that the methods are
permanently serialized in the form of the assembly byte stream (I known I am
ignoring transient assemblies created via Reflection.Emit before anyone
picks me up on it)
Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog
nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/ said:
I have long term question about object serialization.
Object serialization is used in many ways.
In .net I heard XML is used for object serialization. I understand how
object values are serialized and read many books about it.

But, I don't understand how those methods are serialized?
Are instance methods serialized? I think it does so, remoting object method
call is possible.
If so how the method is serialized? Instance values are just data. But
method is sequential steps for execution. How this is serialized and
delivered to other computer?

I want to know how the methods are serialized and de-serialized, and how the
actual performance work?

Thank you..



[microsoft.public.dotnet.languages.csharp]
 
What happens is not the *method* getting serialized but the *method call*. In other words what gets sent across the wire is (in some form) the name of the type, the name of the method and the parameters. SO the type, the methos and the opparameters get bundled up into a serialized package and setn across the wire. At the other end they are unbundled and the type and method indentified thenthe call stack is recreated froim the serializd parameters and the remote type invoked.

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

Thank you for the comment.
You means the methods (including instance and static) are never serialized.
Then my question should turn to this question.
Using web service or remoting API, the remote method is visible from remote
environment.
How the remoting call to remote object works?


Richard Blewett said:
What do you envisage happening when a method is serialized?

Only state (data) is serialized, the methods are part of the type
definition and so are availble within the assembly. Its the state which is
transient unless serialized. I suppose you could argue that the methods are
permanently serialized in the form of the assembly byte stream (I known I am
ignoring transient assemblies created via Reflection.Emit before anyone
picks me up on it)
Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog
nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/ said:
I have long term question about object serialization.
Object serialization is used in many ways.
In .net I heard XML is used for object serialization. I understand how
object values are serialized and read many books about it.

But, I don't understand how those methods are serialized?
Are instance methods serialized? I think it does so, remoting object method
call is possible.
If so how the method is serialized? Instance values are just data. But
method is sequential steps for execution. How this is serialized and
delivered to other computer?

I want to know how the methods are serialized and de-serialized, and how the
actual performance work?

Thank you..



[microsoft.public.dotnet.languages.csharp]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004



[microsoft.public.dotnet.languages.csharp]
 
Back
Top