[jsword-devel] serialization (was: Updates)
joe at eireneh.com
Fri Jul 9 01:32:43 MST 2004
DM Smith wrote:
> I have applied your changes w/o a problem. And I like what I see. I have
> been giving some thought about passage and I was thinking that it was
> redundant with KeyList. And I noticed that there were places in the code
> that knew or assumed a book was a Bible and would have been more useful
> if it did not. I see that you are working on these changes. Kudos.
The second question is on serialization.
I bailed out on Passage when doing serialization because the code to
serialize a Passage to binary needed to be very compact to help with the
storage of search indexes. The most efficient serialization system was
independent of the type of implementation.
So there is a PassageUtil.toBinaryRepresentation and a corresponding
from* version. Which was a cheap way out of getting trapped in the
advanced serialization interfaces; Externalizable etc.
However we need to make this more generic so we can use the same method
for serializing Keys as we do Passages.
Do we continue the hack and have a utility to serialize Keys, that needs
to know about the internal details of all of them (yuck!)
Do we have a toBinary() method on Key?
Do we take a deep breath and read up on Externalizable?
Or something else?
More information about the jsword-devel