[Biojava-l] Re: Biojava-l digest, Vol 1 #6 - 3 msgs

Thomas Down td2@sanger.ac.uk
Tue, 25 Jan 2000 10:49:39 +0000


On Mon, Jan 24, 2000 at 01:21:19PM -0600, Mike Marsh wrote:
> 
> Thanks for the feedback.  My specific replies are below. 
> What is OMG?

The Object Management Group (http://www.omg.org/).  They're
the people behind CORBA, amonst other things.  They have
defined some IDL interfaces for concepts such as Sequence:
I'm not personally convinced that these are the right basis
for the BioJava core, but they certainly offer a good approach
towards interoperability with other lanaguges.

> That is precisely why I have defined Sequence as an abstract class.  My
> ProteinSequence is specifically not 'final' for this reason.  You can
> extend ProteinSequence with ProteinStructure, a sequence of objects which 
> implement both the ProteinChar interface and the Drawable interface.
> AlaStructure extends Ala implements both ProteinChar interface and
> Drawable interface so it will inherit all of the
> intrinsic properties of Ala (charge, aromaticity, etc) and add coordinates
> (or Atom objects) for Calpha, Cbeta, etc.

Java being Java, I'd like to caution against using abstract
classes as the root of your inheritance heierarchy -- it's
better to start with an Interface.  If there's code that you
think is likely to be shared between most/all implementations,
you can always do <AbstractSequence implements Sequence>.

> > I am still in the days of Java 1(.1) as most of what I have been doing had
> > to work round bugs in web browsers. IMHO we should aim to be as backward
> > compatible as reasonably possible. Again this comes down to implementation
> > so shouldn't affect the API presented by biojava. (possible to have two
> > streams, 1.1 and uptodate? ugly but maybe neccessary)
> 
> I disagree totally with this.  New extensions to java simplify the life of
> programmers.  New classes in java2 like Collections, Sets, Lists, etc
> should be embraced because they define API's which are easier to use than
> having all programmers come up with their own incarnations of Sets, Lists,
> etc.  Additionally, java is a rapidly evolving langauge, and that is good.
> Backwards compatiblity is not an issue.  The browsers already have
> plug-ins available to bring them up to speed, and it is only a matter of
> time before new versions are relased with built in up-to-date JVMs.

Yes, I really wouldn't worry too much about the current
generation of web browsers -- even when they claim to
implement Java 1.1, things are Not Good.

Plugins are definitely the way browser Java is going --
Mozilla 5.0 doesn't have any built-in java at all, everyting
is done using OJI plugins.  I don't actually use Internet
Explorer, but I'd guess that Microsoft are going to go the
same way.

Also, Java is increasinly used outside the browser -- it's
great for standalone applications and servlets too.  Most
Java I've written in the last few months has been totally
command-line-based sequence analysis tools.

Thomas.
-- 
``Science is magic that works''  -- Kurt Vonnegut.