The JavaOne conference saw the announcement of Java Beans, an exciting
new component architecture for building modular software systems based
on JavaTM. JDC talked
to Graham Hamilton, chief architect of the Java Beans architecture, and
the Java Beans API. Graham has been with Sun for seven years, and has
contributed to a range of projects, including the Spring distributed
operating system, JavaOS, Java IDL, JDBC, and Java Beans.
"I want to emphasize that our goal is not to build end products, or
tools," says Hamilton, "but to build the best possible supporting
architecture for building Java components. We're not doing this on
our own in a vacuum. We're collaborating with prominent tool vendors
and developers including Borland, Symantec, IBM, Lotus, Netscape,
Rogue Wave, and Justsystem--the largest independent software vendor
in Japan. Justsystem is pretty big; they've been called the 'Microsoft'
of Japan."
Hamilton says IBM is very active in developing what he calls a
"bridge component" for OpenDoc. Other tool builders at IBM are
building bridges to make Java Beans work with VisualAge. Borland,
Symantec and Lotus are working hard to take advantage of Java Beans
technology. JavaSoft itself has built bridge technology to make a
Java Bean component completely indistinguishable from an OCX (Visual
Basic Control).
Java Beans as Persistent Objects
"We're also working closely with various engineers in other parts of
JavaSoft," says Hamilton. "For example, we're using object serialization
stuff from Roger Riggs and the East Coast JavaSoft team. This gives us
a very powerful form of persistence that makes it possible to save the
state of components and to transmit complex components across networks."
Support for object serialization brings new meaning to the idea of a
reusable component, and will change the way developers distribute and
market software.
The distinguishing feature of Java Beans as reusable components is that
they interoperate across all platforms supported by Java.
We've seen reusable components before, but they all have been restricted
to a single platform. Since the JavaTM
Virtual Machine1 runs on a variety
of platforms, a Java component, affectionately called a 'bean' can be
used on any platform supporting the Abstract Window Toolkit (awt). A
bridge technology, which Hamilton refers to as a "universal adapter"
allows a Java Bean component to behave exactly like an OCX that will
interoperate with Visual Basic, Delphi, and other applications that
support OLE/COM automation.
"With a Java Bean bridge, you can call Java from Visual Basic," says
Hamilton, "or you can call from Java into Excel or Word. The technology
is very powerful. We've concentrated on providing, through our APIs,
a solid interface that will give developers access to just about any
events, or properties they are likely to need. In short order, I'm
expecting to see some really great products--GUI window builders,
development environments, browsers, custom component editors, and
debuggers--coming from third party collaborators based on Java Beans."
Keep it Sweet and Simple
Hamilton wants to make it as easy as possible for developers to
evaluate Java Beans so that they can assess the feasibility of using
Java Bean components in critical projects. "I want people to be able
to look at this technology, and within two days, make a decision that
it is going to work for them. The entry cost has to be easy, and the
learning curve shallow. You shouldn't have to go off and read a 1000-page
manual, like Inside OLE before you can write a moderate
component, or make judgements about feasibility and scalability of
embedded components to large projects."
To Build or Buy--That's the Question.
Hamilton's notion of how Java Beans will be used by developers is
similar to what has taken place with component development for Visual
Basic and Delphi. The Java Bean API is important for the success of
both groups--component producers and component consumers--but each has
a very different need.
We think that we'll see developers using Java Beans fall into two groups.
You'll have very expert-level programmers who build the beans or components.
Then you'll have bean consumers, people who are experts in their application
domain, but who don't want to know the internals of the Java Beans API.
They'll take prepackaged beans and use them to build up complex compound
components for reuse in various projects throughout the enterprise, and
within MIS departments at the corporate and ISV levels.
Using Java Beans
The Java component API adds a dynamic capability to portable Java
applets and applications. A button or icon in one document, for instance,
can control functions in another document. For example, a button component
in one document could trigger a bar chart to be drawn in another document;
a live data feed in one document could be represented as a chart in another
document.
The Java component API enables powerful integration of component objects
into applications in multiple formats and architectures, including HTML,
COM, OpenDoc, and LiveConnect. Java Beans components, which will include
ordinary Java applets, can also be embedded into existing "containers"
such as Netscape Navigator, Microsoft Internet Explorer, Microsoft Word
and Excel, Microsoft Visual Basic, and others.
_______
1 As used on this web site, the terms
"Java virtual machine" or "JVM" mean a virtual machine for the Java platform.