DBMS

ROAD: BeanBox 1.1

By Bryan Morgan
DBMS, July 1998
  • Specialized Software International, 120 Stafford St., Worcester, MA 01603; 800-328-2825; www.specializedsoftware.com.
  • Pricing: $495 per single developer license. You can download a 30-day evaluation copy from the Specialized Software Web site. There are no runtime distribution costs.
  • System Requirements: There are no specific hardware or software system requirements. The JavaBeans component model is supported by the Java 1.1 Platform, so all it requires is the Java Development Kit, version 1.1. This is available for a variety of platforms including Windows95/NT, Solaris, HP-UX, and the Macintosh. To use ROAD:BeanBox with IBM VisualAge for Java, you must have either the VisualAge for Java Professional or Enterprise Edition. To use ROAD:BeanBox with Symantec Visual Cafı, version 2.1 or greater of Visual Cafı is required.
ROAD:BeanBox is a Java toolkit that lets you access remote database servers using JDBC.

As the JavaBeans component model matures and continues to increase in popularity, it is inevitable that independent software vendors will create their own JavaBeans that encapsulate standard user interface objects and programming tasks within a single component. ROAD:BeanBox is a Java 1.1 toolkit that makes use of this JavaBeans component model. ROAD stands for rapid object application development, which helps describe the target market. ROAD:BeanBox creates two-tier client/server applications in Java that are designed to access remote database servers using Java Database Connectivity (JDBC). It consists of two primary features:

Also included is an interface to the KL Groupıs LiveTable component for building database applications using a data aware grid control. LiveTable is included with Symantec Visual Cafı 2.1 and greater. Although not available at the time of this review, Specialized Software released ROAD:BeanBox.Jgrid, a data aware grid control for use with ROAD:BeanBox, in May 1998. Even if you are not planning to make use of the LiveTable component included with Visual Cafı 2.1, you still need version 2.1 of Visual Cafı to use ROAD:BeanBox at design time.

The installation of this product is simple because it is an all-Java toolkit. After you modify your systemıs classpath environment variable to include the supplied .jar (Java Archive) files, stepping through the Application Wizard will produce a functional Java database access application. I used the Wizard to connect through ODBC to an Oracle7 database, and it worked as advertised. (See Figure 1.) The documentation was surprisingly thorough and included examples for using the product with JDK 1.1, IBM VisualAge, and Symantec Visual Cafı. In addition, a programmerıs guide gives information on the various classes and interfaces available to the Java developer.

ROAD:BeanBox could be useful to the novice Java developer who would like to build a database access application quickly without having to write code. However, many of the features found in this product are available when database development versions of popular Java development tools are purchased. For instance, various database access tools, data aware components, and rapid application development (RAD) wizards are available with database versions of Symantec Visual Cafı and Borland JBuilder (see reviews of both products in DBMS, February 1998), or IBM VisualAge.

Accessing Databases with ROAD:BeanBox

ROAD:BeanBoxıs true strength lies in its improvements to the basic JDBC cursor model. ROAD:BeanBox provides support for both static and batch cursors that are fully scrollable and updatable. Updates committed using the static cursor are posted to the database immediately, while batch cursor updates are committed to the database using a single batch commit operation. You canıt customize this functionality from within the Application Wizard, so to take advantage of these features, you will need to edit the Java source file created by the Application Wizard tool.

ROAD:BeanBox fully integrates with both the VisualAge for Java and Visual Cafı development environments. Building a query form using ROAD:BeanBox is just a matter of dragging and dropping followed by pointing and clicking. Unless additional logic is required behind the scenes, it isnıt necessary to leave the graphical environment of Visual Cafı or Visual Age when building a database query form. Data aware components such as MaskText or ImageStore simply can be dropped onto the form and tied to the database using a DataAccessor component. At design time, you can start the DataAccessorıs Customizer utility by right-clicking on the desired DataAccessor and selecting "Customizer." At this point, a wizard leads you through the steps necessary to build your database query and connect its result set with the components youıve placed on the form. While the standalone Application Wizard tool will be useful to those with no Java programming experience, I believe the best use of this product comes when developing a database application within another development environment such as Visual Cafı. This gives you the design-time code generation capabilities of Visual Cafı and ROAD:BeanBox with the added ability to drop down and edit or add to the Java code being created for you.

Another powerful feature is the ability to make any component data aware by simply implementing the supplied IDataBound interface. This interface contains the following methods (which are self-explanatory):

The Global interface determines the control type (using GETCONTROLTYPE()) and sets the datatype (using SETDATATYPE()). This interface primarily defines a large number of constants used by the various ROAD:BeanBox objects. For instance, to set a controlıs attributes, the following integer constants are available: DEFAULT, READWRITEUNBOLD, READWRITEBOLD, VISIBLEFALERW, ENABLEFALSEBOLD, HIGHLIGHTTEXT, VISIBLEFALSERONLY.

ROAD:BeanBox also supports the creation of what it calls "complex" data components. These components implement the iComplexDataBound interface, which extends the iDataBound interface (using the object-oriented programming capability of inheritance). This interface adds two new methods, GETDATALENGTH(STRING COLNAME) and GETDATATYPE(STRING COLNAME), which are very useful when creating a component consisting of rows and columns, such as a grid.

If youıre familiar with Java programming or the concept of interfaces (as they exist in DCOM programming or Smalltalk), you realize that simply providing these interfaces doesnıt actually give you any prebuilt application code for free. Instead, it provides a framework that you can use to construct data aware components in an object-oriented fashion quickly.

Some Room for Improvement

A few enhancements could be made to the wizard to make it even more effective. First of all, it would be nice to be able to create a Java applet in addition to an application. Secondly, ROAD:BeanBox should give more configuration options to the user (for example, type of cursor) so that it is not necessary to edit the code directly. The wizard only supports the ability to retrieve a single table, not the results of a SQL query. This is fairly limiting because most database applications join several tables and present this view to the user. In the final application, ROAD:BeanBox autocreated a panel containing a number of buttons to handle inserts, updates, and deletes. It would be a nice option to be able to select which of these capabilities you wanted to include because not all applications allow modifications to the underlying data. The sample application worked fine; however, you must edit some of the code to produce a more professional-looking application.

ROAD:BeanBox generates pure Java code that adds appropriate label and text components to the screen either vertically or horizontally. Unfortunately, it does this without the use of a Java layout manager, so what may look fine on one device may look very poor on another. Layout managers are essential when building user interfaces in Java because of the ability of your completed application to run on a wide variety of hardware platforms and operating systems.

If you order an evaluation copy or purchase a licensed version, keep in mind that ROAD:BeanBoxıs database access capabilities are at the mercy of the JDBC or ODBC drivers you choose. For instance, ROAD:BeanBox needs to be able to query a database to retrieve a list of all of its tables. This feature is not a base ODBC/JDBC requirement and therefore may not be supported by Level 0 drivers. (I tried this with the Microsoft Access driver and no tables showed up.) Herein lies another area of improvement for ROAD:BeanBox: It displays no error messages to the user even if the database server returns them.

Other products that fall into this Java/RAD tool workspace include the major Java development tools (Visual Cafı, JBuilder, and Visual Age), as well as third-party tools such as Aimtechıs Jamba or BulletProofıs JDesignerPro. Obviously, the full-blown development tools offer many more capabilities beyond Java rapid application development. Jamba is an excellent "no coding required" tool that lets the user select from a myriad of options to be included in the created applet or application. Unfortunately, at the current time, Jamba does not include support for relational database access through JDBC, which makes it difficult to compare to ROAD:BeanBox. A more worthy competitor might be JDesignerPro from BulletProof Software. (See the DBMS review, September 1997, for more information on JDesigner.) JDesignerPro approaches the database development issue a bit differently by providing a middle-tier server named Jagg. While ROAD:BeanBox components connect directly to the database via JDBC or a JDBC/ODBC bridge, the JDesignerPro routes database requests via HTTP through the Jagg middleware. JDesignerProıs application creation wizard is also more advanced in terms of options and capabilities. Again, ROAD:BeanBoxıs primary strengths lie in its cursor model and its supplied objects that support the creation of your own data aware components.

ROAD:BeanBox is a good tool for the new Java developer looking to automate much of the database development process. Unfortunately, there is no wizard support for standard database programming tasks (such as a SQL statement builder), and the generated form leaves much to be desired from a user interface standpoint. In addition, the price of this toolset puts it in the ballpark of the more fully featured Visual Cafı Database Development Edition ($799.95), which comes with an unlimited connection, middle-tier database access server (dbAnywhere).

On the plus side, ROAD:BeanBoxıs data aware components are very useful and can be extended using standard Java techniques. Any other Java component can be made data aware by implementing an interface included with ROAD:BeanBox. For this release, the product comes up a little short of what is required by the average Java developer. While it is possible to construct your own data aware components by implementing the iDataBound interface, this toolkit could be made much more powerful by including additional data aware components such as enhanced spreadsheet and charting controls and all of the common data aware components included with Visual Cafı or Visual Age. By adding the ability to use SQL statements, call stored procedures, and customizing the user interface further in the Application Wizard, ROAD:BeanBox could become a very useful tool in the Java database developerıs toolbox.



Figure 1. ROAD:BeanBox Application Wizard


Bryan Morgan is a senior member of the technical staff with Litton/TASC. His primary responsibilities include client/server and Web application development. He has also coauthored a number of books and magazine articles on the topic of database and Java programming. You can reach Bryan at bdmorgan@tasc.com.
What did you think of this article? Send a letter to the editor.


Subscribe to DBMS -- It's free for qualified readers in the United States
July 1998 Table of Contents | Other Contents | Article Index | Search | Site Index | Home

DBMS (http://www.dbmsmag.com)
Copyright © 1998 Miller Freeman, Inc. ALL RIGHTS RESERVED
Redistribution without permission is prohibited.
Please send questions or comments to dbms@mfi.com
Updated June 5, 1998