Building Beans
Volume Number: 13
Issue Number: 6
Column Tag: Javatech
Volume Number: 13
Issue Number: 6
Column Tag: Javatech
Building Beans
by Will Iverson, Apple Computer, Inc.
Building a better application quicker with JavaBeans
Understanding JavaBeans
Over the last few years, we've heard a lot about component technologies, or software
broken up into discrete, mixable sections. From a certain perspective, this includes
such a broad umbrella of component technologies as OpenDoc, OLE, ActiveX, VBXs,
OCXs, MacOS Extensions (INITs), Photoshop Plug-ins, Netscape Navigator Plug-ins,
Control Strip Modules, DCMDs, and even BBEdit Extensions. This is a remarkable list,
and includes some of the most interesting and powerful technologies available.
The latest entry to the field is one of particular interest to developers. JavaBeans, in
the current incarnation, is a component architecture for development tool plug-ins.
JavaSoft has hinted at plans to make JavaBeans spread further than tools -- how this
will pan out remains to be seen. Given the recent introduction of JavaBeans, this
article will cover what a JavaBean is and provide a brief introduction of how to build a
JavaBean.
Most of the information provided in this article is based on the JavaBeans 1.0
specification available from JavaSoft. The reader is advised to frequently check the
JavaSoft site at http://www.javasoft.com/ to stay abreast of the latest revisions to the
specification.
To take full advantage of JavaBeans requires the use of the JDK 1.1, which on the
MacOS means you will need to use MRJ 2.0. By the time this article is printed, a
developer release of MRJ 2.0 should be available from http://applejava.apple.com/.
What is a JavaBean?
Taken directly from the specification: "a JavaBean is a reusable software component
that can be manipulated visually in a builder tool." As of this writing, the only tool
available for the Mac which comes close to implementing the spirit of JavaBeans is
Symantec Visual Cafe, and this is the program from which screenshots below are
taken.
The high level concept is simple -- there is a modular component architecture for the
creation of developer components. Although some mention is made of JavaBeans as a
compound document architecture, there is virtually no support for end user
manipulation.
Figure 1.
In the builder tools above, you will see three windows. The toolbar is a clumping of the
available components, the visual designer is the current visual interface being worked
on, and the property list shows the editable values of the selected component.
Figure 2.
Figure 3.