S
Simon Harvey
Hi everyone,
I'm hoping for a little bit of advice on the following. I am in the process
of making a small application that can send, receive and store email
messages. The current area that I am thinking about is how to store messages
on the hard disk and access them when needed.
I dont want to read all the messages in at runtime because that would make
startup take to long. What I think I need to do is to load a 'header' file
at startup, that will just contain summary information - not the actual body
of the message, nor any of the attachments.
This header information will act as a key to another file stored on the
hardisk, which actually contains the rest of the message data.
My question is - How do I make the files? To explain that a little better,
what I mean is, I'm not sure what approach i should take to creating these
two files. Should I create two types of objects and use serialization? Or
maybe I should output XML somehow?
The other thing I am wondering about is how I would then access the complete
message data on the hard disk, using the header information in memory. I'm
thinking about things like - how to access the file quickly and how to
maintain the file in terms of adding and deleting messages.
Then there's the whole area of folders! What about moving messages between
folders! My poor head.
Any advice on how to approach a problem like this would be excellent.
Thanks everyone
Simon
I'm hoping for a little bit of advice on the following. I am in the process
of making a small application that can send, receive and store email
messages. The current area that I am thinking about is how to store messages
on the hard disk and access them when needed.
I dont want to read all the messages in at runtime because that would make
startup take to long. What I think I need to do is to load a 'header' file
at startup, that will just contain summary information - not the actual body
of the message, nor any of the attachments.
This header information will act as a key to another file stored on the
hardisk, which actually contains the rest of the message data.
My question is - How do I make the files? To explain that a little better,
what I mean is, I'm not sure what approach i should take to creating these
two files. Should I create two types of objects and use serialization? Or
maybe I should output XML somehow?
The other thing I am wondering about is how I would then access the complete
message data on the hard disk, using the header information in memory. I'm
thinking about things like - how to access the file quickly and how to
maintain the file in terms of adding and deleting messages.
Then there's the whole area of folders! What about moving messages between
folders! My poor head.
Any advice on how to approach a problem like this would be excellent.
Thanks everyone
Simon