[Biojava-l] persistence - and the problems with it
Thomas Down
td2@sanger.ac.uk
Wed, 3 May 2000 16:55:29 +0100
On Wed, May 03, 2000 at 03:45:37PM +0100, Simon Brocklehurst wrote:
> >
> > 1) Java Serialisation is a very bad way of making objects persistent.
>
> Agreed! There are just sooooooo many bad things about Java serialization...
Agreed up to a point. It's certainly no panacea, but, to be fair,
it works pretty well for a lot of cases where you want short-term
persistance for data from simple programs. (Hey, it's got me out
of trouble plenty of times...). I'd like to see everything in
Java that /can/ reasonably be serialized marked as Serializable
(for a start, that allows distributed biojava apps using RMI).
Of course, this isn't a reason for not developing more sophisticated
persistance mechanisms for the cases where they're more appropriate.
> You didn't discuss using XML representations of biojava objects. That
> might offer a reasonable way to allow a wide variety of types of user to
> exploit biojava. Once you have the XML you can do what you like with it...
XML is probably my preferred method for a lot of long-term/cross-application
persistance functions. BioJava is already using XML a little bit:
take a look at the XmlMarkovModel class. I expect this will grow,
but when there isn't an existing XML grammer which fulfils the
requirements of a particular BioJava object, a bit of care is needed
to create a new grammer which will be widely accepted.
Thomas.
--
There are whose study is of smells
And to attentive schools rehearse
How something mixed with something else
Makes something worse.