PC Review Forums Newsgroups Microsoft DotNet Microsoft VB .NET Serialization of Object Graph (Inheriting ArrayList)

Reply

Serialization of Object Graph (Inheriting ArrayList)

 
Thread Tools Rate Thread
Old 04-04-2006, 08:07 AM   #1
Lucile
Guest
 
Posts: n/a
Default Serialization of Object Graph (Inheriting ArrayList)


Hi to All, I am new to this newsgroup, so please bare with me.
Here is the deal:
I have the following Object Graph:
Icell (Interface)
Iline (Interface)
Itable (Interface)

Classes: Cell: implements Icell
Line: inherits Arraylist
Implements Iline
Table: inherits Arraylist
Implements Itable
And I want to serialize Class Table to a file. Cell will contain Object
types (Date, String, Decimal). Line will just implement the property
Item to find a given Cell in the ArrayList. And Table will enable the
methods Add, Remove, RemoveAt, Clear, TrimToSize & the property Count.

My question is: Should I do the following to serialize
<Serializable()> Class Cell ....
<Serializable()> Class Line ....
Class Table Implements Iserializable, IdeserializationCallback ....

OR

<Serializable()> Class Cell ....
Class Line Implements Iserializable, IdeserializationCallback ....
Class Table Implements Iserializable, IdeserializationCallback ....

OR something else ?

Please Help!!

Thank you.

Lucile.

  Reply With Quote
Old 04-04-2006, 07:23 PM   #2
SStory
Guest
 
Posts: n/a
Default Re: Serialization of Object Graph (Inheriting ArrayList)

hmm. I don't know about 2005, but in 2003, I gave up and made my own
serialization mechanism by defining an interface having

Save
Load
Version

methods

Each class serialized/deserialized in these methods and used the stored
version to limit new features on loading so that it could still load
previously saved things with older versions.

The built in stuff just seemed too much of a head ache. There is plenty to
read about with it. Jeffery Richter wrote three good papers on it. I just
came away with the impression that it was great to serialize over the
network and for things you will immediately deserialize, but very hokey
otherwise.

Good luck,

Shane
"Lucile" <lucile.dirry@dexia-am.com> wrote in message
news:1144134456.093602.117410@i40g2000cwc.googlegroups.com...
> Hi to All, I am new to this newsgroup, so please bare with me.
> Here is the deal:
> I have the following Object Graph:
> Icell (Interface)
> Iline (Interface)
> Itable (Interface)
>
> Classes: Cell: implements Icell
> Line: inherits Arraylist
> Implements Iline
> Table: inherits Arraylist
> Implements Itable
> And I want to serialize Class Table to a file. Cell will contain Object
> types (Date, String, Decimal). Line will just implement the property
> Item to find a given Cell in the ArrayList. And Table will enable the
> methods Add, Remove, RemoveAt, Clear, TrimToSize & the property Count.
>
> My question is: Should I do the following to serialize
> <Serializable()> Class Cell ....
> <Serializable()> Class Line ....
> Class Table Implements Iserializable, IdeserializationCallback ....
>
> OR
>
> <Serializable()> Class Cell ....
> Class Line Implements Iserializable, IdeserializationCallback ....
> Class Table Implements Iserializable, IdeserializationCallback ....
>
> OR something else ?
>
> Please Help!!
>
> Thank you.
>
> Lucile.
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off