Comments on Java applet development for biosciences
gilbertd at sunflower.bio.indiana.edu
Tue Apr 23 16:25:38 EST 1996
Mark Strivens recently asked me about Java development for the
biosciences. Perhaps these questions and answers may be of
use to some of the rest of you wrestling with whether to
spend time learning Java development.
1) how easy is Java to learn and use?
I had little problem with Java in part because I've been writing
complex GUI-based programs in C++ for a few years now. Java is
close enough to C++ that someone who knows one can do the other
(though I'd recommend for a student to learn C++ first, as Java
seems to be a somewhat odd subset of C++).
Learning Java from a background of no programming may be hard,
but it depends a lot on the motivation, interest and computer
logic skills of the person involved. An interested teen-ager
w/ intelligence and desire to write the best Java game of Doom
or whatever, might learn enough in a week or two.
Learning Java from a background of C would not be as hard, as much
of C++/Java is related to C. Programming skills of various
kinds will translate to Java. However Java and C++ are object-oriented
in outlook and this is a much different programming design
mode than the older procedural languages like C, Pascal, Basic, Fortran.
I find it (OOP) to be a much better way to organize software
development, pretty much as people say, to make software more
reusable and maintainable, and more easily developed and debugged.
Also a lot of learning a new programming language, to me, is
having the interest, time and the proper examples and tools
for trial and error learning. For instance, I started learning
Java by getting the free Sun Java developer's kit, looking at example
applets, and modifying one or two that looked like what I'd
like to do. The Flies in your Java mapplet I wrote I got started
using the Java example 'MoleculeViewer' as it had a similar goal
of displaying data on a window frame. I learned how to create
dialogs with a layout of buttons, text boxes and such from
other demo applets and from the fairly good programming guide
and Java API help documents.
So how hard this is depends a lot on the interest and programming
background that you bring to it.
2) How is the Java Applet being developed, by professional software
engineers, scientists both?
The people working on Java now are mostly those w/ prior programming
experience, professional programmers or those with C++ experience.
This includes scientists, but mostly scientists who specialize in
computing (biocomputists, bioinformatics, molecular modelling, physics,
etc.). They are those who have enough background to make sense of
the currently somewhat haphazard and buggy Java development software.
3) Approximately how long did the app take to design to the current point?
The Fly genome mapplet I wrote took a couple long weekends. But many
basic parts had been designed already in a C program that I used
to draw gene maps. What I did was convert this to C++, add Java
user-interface elements, clean it up a bunch, and add new elements and
options. Since this was my first Java program, a fair amount of time
was spent learning the particulars of Java. I also have spent time
trying to get around the bugs in Java, as well as my own misunderstandings
of how it works.
I spent more time (several weekends) trying to get computer
systems that would run Java. That included buying a new
computer, spending lots of time trying to get variants of Unix installed
on it (Linux has a Java development environment, but it took me so much
longer to get Linux going than I'd thought that I use other systems
now for Java).
4) What do you think the advantages are to users and designers of this
type of approach?
Java and OpenDoc are two new 'component software' initiatives that
will make it much easier, in the long run, for individual programmers
including scientists and part-time developers, to produce works
that users find appealing and functional. The current programming
paradigm of developing very large, complex applications that can do
many things and have a very easy-to-learn interface takes an awful lot
of effort. The average scientist cannot take an idea for data analysis
and put it into a working program that will be easy for others to use,
aside from a few special cases (like Hypercard or maybe Visual Basic).
S/He cannot produce a program that will work on computers all colleagues use,
because cross-platform programming is still a very difficult problem.
Java and OpenDoc and like new approaches to programming will change
this, if things work out the way their developers believe. Java does
provide cross-platform, relatively easy to develop programming methods,
and takes the bother out of distribution of this software. Java has
quite simplified the amount of programming needed for Internet
access, and for user-interface development. There are limitations
to Java. I don't see it yet as capable of developing a complex
user-interface program, or a complex program of any kind. I think
the media hype of having your next wordprocessor be written in Java
is completely absurd.
On the other hand, OpenDoc when it matures,
will likely be the basis for your next wordprocessor, with various
parts that you, a user, can customize in, including adding your
favorite biosequence editor part. It still amazes me that one of
biosequence editors most favored among biologists is Microsoft Word
or Wordperfect word processor.
These new methods will offer some advantages, but not necessarily outstanding
advantages compared to older programming technologies like Hypercard,
Visual Basic and languages like SmallTalk & C++. In large measure we will
have to wait to see what the advantages are.
But in the near term, I find Java
a compelling method to provide flexible Internet client programs that
I don't find in any other current development system.
Are there any other comments you'd like to make on scientific apps. and
At this point (April 96) it is pretty early in Java use for me to recommend
it for the average scientist to develop or to use. Java is still buggy as a development system. Development software for it is still
in an early stage. Display software is buggy and limited
(Netscape, Appletviewer). If you work with it now, you will have
to battle bugs in the development and display software as well as
problems of your own making.
Java offers to return the flexibility that
Netscape/Mosaic took away from Internet client-server application
development. There was a time when I could write both client
and server portions of Internet software, and get it to do interesting
things for biologists. When Mosaic/Netscape became the defacto
standard for Internet info systems, they locked out the small-time
programmer from client development, since these clients are much too
complex for a single developer to compete with.
Java returns to me and other individual developers the ability to write
Internet client software, to make it do what it we think it should
do for, for instance to build a program to interactively display
gene maps, to browse and scroll thru such and items for further info,
accessing data from Internet servers as needed, but not fetching
hugh bitmap images of maps when a set of data points does the job better.
-- d.gilbert--biocomputing--indiana u--bloomington--gilbertd at bio.indiana.edu
More information about the Bio-soft