Serialization Question for .Net 2.0

V

V

Hi,

I am trying to ascertain if Object Serialization (binary or xml) has
been improved (new classes, or new ways) from version 1.1 of the .net
framework.

I pretty much know how to do that in 1.1, and am working on a program
which requires this. So before re-using the old concepts, i was trying
to see if there are any new ones.

so... HELP!

Thanks,
Vaibhav
 
N

Nicholas Paldino [.NET/C# MVP]

Vaibhav,

The Binary Formatter for serialization has been improved a little from
1.1 to 2.0 with the addition of new serialization events for your objects.
However, everything that you know about serialization now still applies, so
I would say go ahead and use the old concepts.

Mind you, the a new serialization model will be added with the
introduction of the WinFX components, so you might want to read up on it in
an attempt to future-proof your classes (should you decide you need it).

Hope this helps.
 
V

V

Thank you Nicholas. At least now I know not to spend anymore time
looking for magic in the new framework version :).

Regards,
Vaibhav
 
G

Guest

vaibhav. one of the biggest issues with serialization in earlier versions was
versioning of objects. in a large 1.1 application i ended up implementing
custom deserializer logic for every persisted class, which was onerous. i'm
not working on this application anymore but i know that 2.0 attempts to solve
these issues..

http://msdn2.microsoft.com/en-US/library/ms229752.aspx

good luck

kh
 
E

elgrego

Hi Vaibhav,

I have recently built object upon the implementing the IXmlSerializable
which have been greatly improved in 2.0 (my opinion though).

http://msdn.microsoft.com/msdnmag/issues/06/06/ClassToContract/default.aspx


This looked very cumbersome when I first started but has turned out
quite nice.
Especially if you want complete control and have other systems (java)
and such that are dependent on a nice schema for the objects.

Also, I use the schemaImporterExtensions element in the config to disable
VS's irritating habbit of creating proxy-classes for the objects
that are already in my namespace.

Hope some of it makes sense. =)

Regards Gregor
 
V

V

Thanks Gregor for your input. I am going through the link that you sent
but for my little task it seems like an overkill.

However, i think the learning from this link is going to go into
something else (like making an organization-wide serialization library
:) )

- Vaibhav
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top