473,405 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Serialization of collection

I am confused on serializtion.

I have a class called picture. It has a bitmap member and several others.

I have a collection class called pictures which inherits from
collectionbase.

How should I best serialize them? They are part of a larger object graph of
course, but so far I am having trouble and have tried various things.

The thing is, that it seems to be so complex and such a black box, that when
something goes wrong, I have no idea what to do to fix it.

TIA,

Shane
Nov 21 '05 #1
1 1280
After much research--causing my project to be in limbo for a while--and
after reading many articles and all, I decided that serialization is great
for a temporary short-term thing, but for long term persistence appears
half-baked and problem ridden. For this reason, I just implemented my own
"serialization" Interface in each object and pass them a binarywriter or
binaryreader, each object saves its version and then if changes occur I can
handle it there.

Since I wrote it, it is no longer a black box.

This is my thinking with many of the nice features that MS puts out. There
is a lot of good stuff but too much control has to be given up to us it and
you don't know what to do if it breaks.

Thanks anyhow.

Shane
"Shane Story" <no****@nothanks.com> wrote in message
news:en**************@TK2MSFTNGP12.phx.gbl...
I am confused on serializtion.

I have a class called picture. It has a bitmap member and several others.

I have a collection class called pictures which inherits from
collectionbase.

How should I best serialize them? They are part of a larger object graph
of course, but so far I am having trouble and have tried various things.

The thing is, that it seems to be so complex and such a black box, that
when something goes wrong, I have no idea what to do to fix it.

TIA,

Shane

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Franz | last post by:
Let me describe the flow of my program first. 1. Deserialize data from xml file. 2. Addition of "PersonType" class to the AllPersonalData. 3. Serialize data back to the xml file. My question is...
0
by: Joe Rizla | last post by:
I am using XML Serialization to output the IBuySpy tabs data. I have used System.Xml.Serialization to serialize an array of a class called TabStripDetails. Using attributes I rename the resultant...
2
by: Snowman | last post by:
Suppose I have a RootObject which holds a collection of other objects. The other objects have a property (Parent) which refers back to the "parent" collection (b.t.w. my collection is based on...
4
by: hs | last post by:
Hi I am serializing a dataset using a binary formatter as follows: IFormatter formater = new BinaryFormatter(); formatter.Serialize(stream, ds); // ds=DataSet, stream=MemoryStream .... DataSet...
7
by: schoenfeld1 | last post by:
I've implemented IPC between two applications using named pipes and binary serialization, but have noticed that the binary formatter is rather slow. It seems that the binary formatter reflects...
27
by: Codemonkey | last post by:
Heya All, Sorry, but I think it's about time for a monkey-ramble. I've just had enough of trying to serialize even simple objects with VB. A simple task you may think - stick the...
4
by: Michael Rich | last post by:
Can anyone point me to a collection class that has serialization/deserialization with it - preferably in XML. I know this can't be done with a collection that inherits from CollectionBase, but...
10
by: SStory | last post by:
My app is near completed for the basic feature of version 1.0. I have an extensive object model and I now want to persist my objects using serialization. I have chosen binaryformatter to...
7
by: Joe | last post by:
I've tracked the performance issue down to a single class. This class derives from CollectionBase and stores a basic value type such as string, int, double, etc... I also store the type itself...
3
by: GreyAlien007 | last post by:
I extended the class TreeNode to add some properties of my liking. Anyway, no problems there, I can add my derived TreeNode into TreeNodeCollections and use the properties etc. However, when I...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.