When to Use ISerializable?

D

Dave Veeneman

I use binary serialization for file storage in an application I am creating.
Right now, I'm using simple serialization with a [Serializable] attribute.
Now, let's say I create a later version with a modified class structure. I'm
planning to implement ISerializable and a SerializationBinder on my classes
at that time to enable reading prior version files.

Is it okay to defer implementing these items until they are actually needed?
Is it a good idea? Or would I be better off implementing ISerializable in
all my classes from the outset? Thanks for your advice.

Dave Veeneman
Foresight Systems, Inc.
 
N

Nicholas Paldino [.NET/C# MVP]

Dave,

It depends on what your priority now is. If you have other priorities
and need to develop those, then I would hold off, especially if you see the
volatility of the structure of your classes being low.

However, if you see your class structure changing in the immediate
future, then do the work now.

If you can hold out, I would wait for Whidbey, as the story for
Serialization is going to be improved somewhat.

Hope this helps.
 
D

Dave Veeneman

Didn't know Whidbey is changing Serialization. Thanks for the tip, and the
advice.
 
G

Guest

If you can hold out, I would wait for Whidbey, as the story for
Serialization is going to be improved somewhat.

Ahem... No disrespect intendend Nicholas, but that's quite a moving target,
don't you think? I mean, we're looking at no less than 6 months and likely
closer to a year before the release of Whidbey last I checked. It's already
been delayed what, 2, 3 times? I just wouldn't recommend people hold their
breath for Whidbey features unless their development plans are pretty long
term.

Pete
 
N

Nicholas Paldino [.NET/C# MVP]

Pete,

You bring up some very valid points. It is quite a moving target.
However, whether or not it is applicable for what the original poster (OP)
is trying to do is completely up to him. He has to figure out on his own
based on his requirements whether or not it is something that can be waited
for. I merely provided information that he needed to make a more informed
decision (as much as I could, without knowing what his specific requirements
are).
 
D

David Levine

Nick,

I use ISerialization and a SerializationBinder extensively for versioning
purposes. Can you provide a glimpse into how Whidbey will affect this? What
can I do now that provides the versioning benefits of ISerializable without
programming myself into a corner with respect to Whidbey changes? Thanks

Dave

Nicholas Paldino said:
Pete,

You bring up some very valid points. It is quite a moving target.
However, whether or not it is applicable for what the original poster (OP)
is trying to do is completely up to him. He has to figure out on his own
based on his requirements whether or not it is something that can be waited
for. I merely provided information that he needed to make a more informed
decision (as much as I could, without knowing what his specific requirements
are).

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Ahem... No disrespect intendend Nicholas, but that's quite a moving target,
don't you think? I mean, we're looking at no less than 6 months and likely
closer to a year before the release of Whidbey last I checked. It's already
been delayed what, 2, 3 times? I just wouldn't recommend people hold their
breath for Whidbey features unless their development plans are pretty long
term.

Pete
 
É

Éric Moreau

Can you tell us what will be improved to serialization in Whidbey? Any
articles/links on that?

--

TIA

Éric Moreau, MCSD
Conseiller Principal / Senior Consultant
Concept S2i inc.(www.s2i.com)


Nicholas Paldino said:
Dave,

It depends on what your priority now is. If you have other priorities
and need to develop those, then I would hold off, especially if you see the
volatility of the structure of your classes being low.

However, if you see your class structure changing in the immediate
future, then do the work now.

If you can hold out, I would wait for Whidbey, as the story for
Serialization is going to be improved somewhat.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Dave Veeneman said:
I use binary serialization for file storage in an application I am creating.
Right now, I'm using simple serialization with a [Serializable] attribute.
Now, let's say I create a later version with a modified class structure. I'm
planning to implement ISerializable and a SerializationBinder on my classes
at that time to enable reading prior version files.

Is it okay to defer implementing these items until they are actually needed?
Is it a good idea? Or would I be better off implementing ISerializable in
all my classes from the outset? Thanks for your advice.

Dave Veeneman
Foresight Systems, Inc.
 
N

Nicholas Paldino [.NET/C# MVP]

David,

There is actually a good presentation by Doug Purdy from PDC that shows
all the serialization enhancements. This presentation was given at PDC
2003, but the full presentation (with audio) is no longer available. You
can download the powerpoint presentation slides though from the MSDN site.
The one you want to see is titled "Indigo: Using XSD, CLR Types, and
Serialization in Web Services", located at (watch for line wrap):

http://download.microsoft.com/download/0/8/F/08F3D7B9-C0CC-418A-AAD4-F15D491EE6C7/WSV303.ppt

Even though it is titled "Indigo", it does speak about serialization in
whidbey, and how it will help with versioning.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

David Levine said:
Nick,

I use ISerialization and a SerializationBinder extensively for versioning
purposes. Can you provide a glimpse into how Whidbey will affect this? What
can I do now that provides the versioning benefits of ISerializable without
programming myself into a corner with respect to Whidbey changes? Thanks

Dave

message news:[email protected]...
Pete,

You bring up some very valid points. It is quite a moving target.
However, whether or not it is applicable for what the original poster (OP)
is trying to do is completely up to him. He has to figure out on his own
based on his requirements whether or not it is something that can be waited
for. I merely provided information that he needed to make a more informed
decision (as much as I could, without knowing what his specific requirements
are).

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

If you can hold out, I would wait for Whidbey, as the story for
Serialization is going to be improved somewhat.


Ahem... No disrespect intendend Nicholas, but that's quite a moving target,
don't you think? I mean, we're looking at no less than 6 months and likely
closer to a year before the release of Whidbey last I checked. It's already
been delayed what, 2, 3 times? I just wouldn't recommend people hold their
breath for Whidbey features unless their development plans are pretty long
term.

Pete
 
D

David Levine

Thanks. I downloaded it but I wont be able to view until I get back to my
office (I don't have powerpoint at home).



Nicholas Paldino said:
David,

There is actually a good presentation by Doug Purdy from PDC that shows
all the serialization enhancements. This presentation was given at PDC
2003, but the full presentation (with audio) is no longer available. You
can download the powerpoint presentation slides though from the MSDN site.
The one you want to see is titled "Indigo: Using XSD, CLR Types, and
Serialization in Web Services", located at (watch for line wrap):

http://download.microsoft.com/download/0/8/F/08F3D7B9-C0CC-418A-AAD4-F15D491EE6C7/WSV303.ppt

Even though it is titled "Indigo", it does speak about serialization in
whidbey, and how it will help with versioning.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

David Levine said:
Nick,

I use ISerialization and a SerializationBinder extensively for versioning
purposes. Can you provide a glimpse into how Whidbey will affect this? What
can I do now that provides the versioning benefits of ISerializable without
programming myself into a corner with respect to Whidbey changes? Thanks

Dave

message news:[email protected]...
Pete,

You bring up some very valid points. It is quite a moving target.
However, whether or not it is applicable for what the original poster (OP)
is trying to do is completely up to him. He has to figure out on his own
based on his requirements whether or not it is something that can be waited
for. I merely provided information that he needed to make a more informed
decision (as much as I could, without knowing what his specific requirements
are).

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


If you can hold out, I would wait for Whidbey, as the story for
Serialization is going to be improved somewhat.


Ahem... No disrespect intendend Nicholas, but that's quite a moving
target,
don't you think? I mean, we're looking at no less than 6 months and likely
closer to a year before the release of Whidbey last I checked. It's
already
been delayed what, 2, 3 times? I just wouldn't recommend people hold their
breath for Whidbey features unless their development plans are
pretty
long
term.

Pete
 
D

David Levine

Hi Nick,

I looked at the powerpoint at the link (thanks) and I think it would
probably have been a lot more meaningful it I had been at the presentation
:)

I guess my question about this can be boiled down to this: is there anything
coming in future releases that should make me not use ISerialization and
SerializationBinder today? If not, how should serialization and versioning
be handled today so that it is compatible with intended future changes?

Thanks,
Dave



Nicholas Paldino said:
David,

There is actually a good presentation by Doug Purdy from PDC that shows
all the serialization enhancements. This presentation was given at PDC
2003, but the full presentation (with audio) is no longer available. You
can download the powerpoint presentation slides though from the MSDN site.
The one you want to see is titled "Indigo: Using XSD, CLR Types, and
Serialization in Web Services", located at (watch for line wrap):

http://download.microsoft.com/download/0/8/F/08F3D7B9-C0CC-418A-AAD4-F15D491EE6C7/WSV303.ppt

Even though it is titled "Indigo", it does speak about serialization in
whidbey, and how it will help with versioning.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

David Levine said:
Nick,

I use ISerialization and a SerializationBinder extensively for versioning
purposes. Can you provide a glimpse into how Whidbey will affect this? What
can I do now that provides the versioning benefits of ISerializable without
programming myself into a corner with respect to Whidbey changes? Thanks

Dave
 

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