DBMS, August 1996
C/S Developer By David S. Linthicum

Here Come the Java Tools

New Tools Make Java Development Quick and Easy For Client/Server Developers.

In January 1996, I wrote a column on a little-known programming language called Java. In the column I mentioned that Java had the potential to bring dynamic application development to the previously rigid Web, and thus give client/server developers the ability to deploy client/server applications on the Internet or an Intranet. As you know, the hype surrounding Java since then has been extraordinary. The mass migration of development tools to the Java way of thinking includes most of the heavy hitters in the industry.

For those of you who still don't understand Java (it's okay to admit this), Java allows developers to create true dynamic two-tier and three-tier client/server applications that can run within popular browsers such as Netscape's Navigator 2.0. Java exists as "applets" that are embedded inside traditional HTML documents found on Web servers. Using a Java-enabled Web browser, end users transparently download applets into the browser environment for execution.

Java applets aren't native executables - they exist as portable bytecode. Applets execute via a Java interpreter that is built inside the browser, and they can do most things other applications can do such as prompt for input, process information, and connect to external resources such as remote databases and middleware layers. Java DataBase Connectivity (JDBC), Java's answer to ODBC, will make database connections even more convenient. Of course, there are several security checks that take place to ensure that you don't invoke an applet that compromises or damages your system.

There is a downside to Java. The Java language, simply put, is C++ without pointers. Thus application development is slow with traditional Java tools such as Sun's JDK (Java Development Kit) 1.0. Also, Java applets' runtime performance makes end users drum their fingers, and the compile time for applets can be longer than the time it took me to write this paragraph. What's more, traditional command-line Java tools lack rapid application development (RAD) features.

Because necessity is the mother of all invention, Java's popularity drove a number of tool vendors back to their development shops to create the perfect Java development environment. The goal is to make Java development effortless. The resulting tools aim to overcome the limitations of Java, including runtime and compiler performance, and finally bring RAD to the 3GL world of Java development. Some of the new Java development tools that just hit the streets include JFactory from Rogue Wave Software, Borland C++ Developer's Suite, and café from Symantec. This month I take you on a short tour through each of these new tools.

Café for Windows

Symantec's Café for Windows is a standalone Java development environment that only supports Java development. (See Figure 1.) This means that developers won't have to worry about mixing and matching C++ and Java features, which can create operational problems (such as using pointers). This also means you'll need two separate tools to support both C++ and Java development.

Café is a visual development environment that removes the developer from most of the complexities of Java development found in the JDK. Café uses its own version of Sun's Java compiler, as well is its own proprietary high-speed native Java-to-bytecode compiler. Café's compiler cuts compile times dramatically. Café also offers a Just-in-Time compiler for Java, which improves applet execution performance by changing bytecode into native processor instructions. This technology is able to read the intermediate bytecode, translating it on-the-fly into machine-executable instructions on the client. The Just-in-Time compiler avoids the overhead that interprets the bytecode, and Symantec claims performance gains of 23-fold using this technology.

The heart of Café is Studio. Studio lets developers create applets visually, including views and forms. As with other RAD tools, Studio provides a palette of prebuilt GUI controls that developers can paste into applets. When a Java developer drags a control onto a form, Studio automatically displays a property sheet. As with Visual Basic or Delphi, the developer uses the property sheets to change the characteristic (look, feel, behavior, and so on) of the GUI control. Studio can also reverse-engineer existing RC-compliant windows into the editor. This means Café can use some parts of existing Visual Basic and Delphi applications. Once you're happy with the look and feel of your applet, Studio generates the Java language source code automatically.

To further its RAD capabilities, Café includes a project template generator and an application template generator, known as Project Express and AppExpress, respectively. Project Express lets you create new projects automatically. All you do is provide the name and the application type (Java applets, JavaSingle Document Interface [SDI], or Java standalone console application). AppExpress creates a skeletal Java applet (a generic template) and the HTML file that goes with the applet.

To get at the details of the applet, Café provides Hierarchy Editor and Class Editor. Hierarchy Editor gives developers the capability to design applets at 35,000 feet, manipulating the class hierarchy or the structure of the applet. Hierarchy Editor uses a drag-and-drop mechanism to manipulate the hierarchy; the underlying source code is automatically changed to reflect the new structure. Developers can drill down through the details of the classes using the Class Editor, which is accessible by double-clicking on a class. In addition, Café includes a Visual Debugger for debugging applets.

Borland C++ 5.0 Developer's Suite

Borland C++ Developer's Suite takes a different approach than Café by incorporating the Java development tools with the popular Borland C++ compiler. (See Figure 2.) This means that you can build both C++ and Java applications in the same environment and create mixed Java and C++ projects. This is helpful when you deploy both Java and native Windows incarnations of the same application. They share the same windows painter, controls, frameworks, and compiler engines. This is also convenient for those of you who are already familiar with the traditional Borland C++ development environment.

You'll have to hunt through the integrated development environment (IDE), but you'll find that Borland C++ 5.0 supports applet development through the use of project management support, a built-in Java compiler, a visual applet debugger, a color-coded source-code editor, and a code-generation expert. Borland C++ also provides a proprietary AppAccelerator, Borland's version of a Just-in-Time compiler for Java (which becomes part of Netscape Navigator). Moreover, it's a freebie. The Java tools are built into the base Borland C++ 5.0 Development Suite.

To create an applet using Borland C++ 5.0, you must invoke TargetExpert. TargetExpert allows you to specify a project directory and target name for an application, as well as the type of application (Java, DLL, Windows, and so on). It's TargetExpert's job to ensure that you've configured the environment correctly. From the TargetExpert, you can launch AppExpert.

AppExpert (where have we heard that before?), as with Café, creates a skeleton application using the options you selected in TargetExpert. Once you generate the base application, you can examine the generated code using the Edit Window of Borland C++. Simply double-click on the .java file in the Project Manager. The Project Manager organizes the source code for the applets and keeps track of source file dependencies. Project Manager also lets you specify multiple targets and build several versions (Java, DLL, Windows, and so on) of the same base application. Furthermore, Project Manager keeps track of projects that mix C/C++ and Java files in a single project. Borland's visual debugger lets you track down and correct problems. The visual debugger lets you set breakpoints, view variables, and step through the execution of a Java applet. Borland C++ can also compile Web-ready bytecode using a non-optimized Java compiler.

AppAccelerator can make Java applets run five to 10 times faster than applets that don't use this technology. AppAccelerator reads the intermediate bytecode and translates it during execution into native executables (that is, Win32). Currently, AppAccelerator only works with Windows 95 and Windows NT. It won't do you much good if you deploy to non-Windows environments such as Unix and Macintosh.

JFactory

JFactory from Rogue Wave Software Inc. is one of the few Java development environments that did not reinvent an existing C++ compiler. However, Rogue Wave has a lot of experience with C++ development as the builder of the best-selling dbTools.h++ and Tool.h++ C++ application development frameworks. (See DBMS, July 1996, for an in-depth review of dbTools.h++.) Rogue Wave makes the most of its C++ experience with the JFactory tool. Like Café, JFactory is a Java applet development environment that leverages RAD capabilities and hides the complexities of raw applet development.

With JFactory, there are several subsystems that help you build Java applets. At the core are the Project Manager, the Window and Dialog Design Tool, and the Menu Design tool. The Project Manager (like the project managers found in both Café and Borland C++ 5.0) tracks all files, objects, options, and resources that make up a Java application. Developers use the Project Manager to manipulate the objects encapsulated inside the project file such as windows, menu, and dialogs.

There are three predefined project templates to select from: Applet, App, and Menu App. The Applet template defines an applet project with a simple main window that represents a browser frame. The App template defines an application project including a main window. The Menu App template defines everything that App does, but with additional basic menu features (File, Edit, and Help). As with the other tools, this is not an application generator but simply a starting point so that you don't have to build the applet from scratch.

JFactory's Windows and Dialog Design visual development tools let you paint windows and create dialogs for Java applets. You can drag and drop GUI controls from a palette onto both windows and dialogs. Most code generators, however, don't provide all the bells and whistles you'll need to complete your application. JFactory lets you create custom code and add the code between "protect" blocks in the generated code. This way the user-created code survives subsequent regeneration.

As I already mentioned, Rogue Wave is in the business of selling objects, and this tool is no exception. JFactory's Object Library lets developers reuse canned or custom objects throughout the application via use of a primitive object repository.

Once you build an applet, you can test it with JFactory's standalone test mode. After you know that the applet works properly, the next step is code generation. JFactory generates the HTML file required to load the applet in a Java-enabled browser, and it generates the Java file that contains the Java code necessary to create the windows and dialog in the application.

Dave's Blend

Surprisingly, both Café and Borland C++ 5.0 provide many of the same features (such as a Just-in-Time compiler [Borland calls it AppAccelerator], project manager, application generator, and visual debugger). The advantage goes to Café for compiler speed, but there are tradeoffs for each approach.

Symantec's decision not to bundle its Java tools with its compiler means that new Java developers won't have to deal with the complexities of a full-blown C++ development environment just to create Java applets. Nor will they ever run the risk of the operational problems that occur when you mix Java and C++ code (such as using pointers). However, many initial Java development projects will be applications deployed in both C++ and Java, meaning that developers will have to switch back and forth from environment to environment. Sharing base code will be difficult. Café clearly intends to go after shops that want Java-only tools.

Borland C++ 5.0, with its Java tools included, will certainly be a big hit with existing Borland C++ development shops. Those shops will find that Java application development is no more difficult (or easy) than Windows application development. Borland does a good job of letting you mix and match Java and C++ code in a single project, and it also provides multiple targets (applets, DLLs, Windows .exe, and so on). This is my pick for those who want the best of both worlds.

JFactory offers a basic applet development and code-generation environment. This is the best choice for those who want to create simple applets quickly, without a lot of programming knowledge (such as those who maintain Web sites, or those who just want to play). However, code-generation features are limited, and like the other two tools, you have to understand Java before you can create "real applications." JFactory also lacks a few pieces such as a good visual debugger and a Just-in-Time compiler. Although this company is new to the game, I expect big things from it in the future.

The reality of Java is that we've only just begun to explore its potential (as well as its limitations). As we continue to see organizations solve real-world problems with Java and the Web platform, tools such as Symantec Café, Borland C++, and Rogue Wave Software JFactory will pave the road to Java success on the Internet and on Intranets. Table 1 lists other Java development environments. Let me know what your experience is with Java. Drop me a cyber-note. We're sure to see a lot more from Java Joe now that client/server and the Web are firmly joined at the hip.


David S. Linthicum is a technical manager with EDS in Falls Church, Virginia. He's the author of several books on software development, a speaker, and an associate professor of computer science at a local college. You can reach David via email at 70742.3165@compuserve.com, or visit his home page at http://ourworld.compuserve.com:80/homepages/D_Linthicum/.


* Borland International Inc., 100 Borland Way, Scotts Valley, CA 95066; 800-233-2444, 408-431-1000, or fax 408-431-4122; http://www.borland.com.
* Rogue Wave Software Inc., 850 Southwest 35th St., Corvallis, OR 97333; 800-487-3217 or fax 541-758-4761; http://www.roguewave.com.
* Symantec Corp., 10201 Torre Ave., Cupertino, CA 95014; 800-441-7234, 408-253-9600, or fax 408-253-3968; http://www.symantec.com.

Figure 1


Symantec's Café is a standalone Java development environment that supports only Java development. This means that developers won't have to worry about mixing and matching C++ and Java features that could create operational problems.

Figure 2


Borland C++ takes a different approach than Café by incorporating the Java development tools with the popular Borland C++ compiler. Therefore, developers can build both C++ and Java applications in the same environment and create mixed Java and C++ projects.


Table of Contents - August 1996 | Home Page
Copyright © 1996 Miller Freeman, Inc. ALL RIGHTS RESERVED
Redistribution without permission is prohibited.
Please send questions or comments to mfrank@mfi.com
Updated Monday, August 12, 1996