Borland's JBuilder is a noteworthy entry in the Java IDE market because Borland has delivered excellent IDEs with their C++ and Delphi products and because Borland has set its sights on enterprise development with the "Client/Server Suite" edition of each of its products.
My past experience with Borland's C++ and Delphi products has generally been that they "feel good" — the user interfaces are well-designed, the right tools are available and responsive, and the compilers generate good executable code. JBuilder seems on track to deliver the same kind of environment for Java, but version 1.0 felt like it could use a little work, as I'll explain below.
For this article, I worked with JBuilder Professional; in the next issue of JES, I'll cover the Client/Server Suite and will focus more heavily on AS/400- related features.
The JBuilder environment
You organize your work in JBuilder into projects, which include HTML and Java source files as well as resource files of various sorts. For each project, JBuilder maintains a project-name.jpr file with information about the project's other files and various project settings. JBuilder doesn't use a repository for the project components' visual layout and interrelationships. Instead, when you open a Java file, JBuilder parses the source to determine all the component information. As you work on a project, you can visually design the user interface or edit source code directly and JBuilder keeps the visual layout and source code in synch. This may sound like an unreliable or slow way to keep track of a project's components and structure, but it performed fairly solidly and quickly on my projects.
Figure 1 shows the JBuilder main window (the menus and tool buttons) and a project opened in the AppBrowser below the main window. The AppBrowser is divided into sections and has a number of quick ways to expand and contract the sections as you work. Tabs at the bottom of each section switch among various views.
The leftmost section is the Structure pane and provides hierarchical navigation aids. In Figure 1, the upper portion shows the project's files, and the lower portion shows the selected file's components, which are also displayed visually in the Component pane to the right.
For Java source files, the Component pane shows either the file's user interface (if it has one) or the source code. You can also display formatted HTML documentation for a Java file that's been processed by JavaDoc.
When you're working with the UI Designer view, the Property Inspector (to the right of the Component pane in Figure 1displays the selected component's properties or events. In JBuilder, all components are handled as JavaBeans. During the parse process, JBuilder looks for BeanInfo classes or property- and event-related methods to determine each bean's features.
A quick walkthrough
You start the basic process of creating a new Java app by running one of the JBuilder wizards to create a source-code skeleton. Then you select beans from the 60 or so available on the main window's palette and drop them on the Design work area. You set initial property values with the Property Inspector. To add code for an event, you double- click beside the event name in the Property Inspector, and JBuilder generates both the AddXxxListener code and the shell of a method that's called when the event occurs. You use the source code editor to fill in the code for whatever actions you want to occur.
You can add nonvisual beans to a project as well. These don't show up in the visual work area, but they're included in the Structure pane where you can select them and use the Property Inspector to set attributes or generate event-handling code.
JBuilder also has an Interaction Wizard, which lets you select from dropdown lists to connect an event in one bean to a method in another bean. When you complete the interaction, JBuilder generates the appropriate code.
To test or debug an app, you click either the Run or Debug tool button and JBuilder compiles your source into .class files. The debugger has all the standard features, including support for breakpoints, single stepping, and inspecting variables. The debugger is not dynamic (or interpretive) — to test revised code, you have to exit the app, change the code, recompile it, and rerun it. JBuilder compilation is very fast, but even so, JBuilder's debugging feature doesn't provide the convenience of a dynamic debugger that lets you revise code and continue execution using the new code.
When you're ready to put an app into production, JBuilder has a Deployment Wizard that stuffs all the required class files into a Zip or JAR file that you can make available from your Web server.
Sizing up the Professional edition
Overall, I found JBuilder easy to learn and use. The fundamental concept is similar to Visual Basic, Delphi, and good C++ IDEs: The entire app structure is represented in the source code, and the visual environment is used for user interface design only. The source code generated by the Property Inspector and the wizards is simple and easy to follow, assuming you know a little about Java. I like the fact that JBuilder doesn't stuff a bunch of special comments in the source to maintain information about the project. IDEs that do this can get really screwed up when you edit the source directly and it becomes inconsistent with the comments.
JBuilder's User's Guide is well written and covered most of what I needed to know. A Programmer's Guide covers database access using the data-aware beans that Borland supplies and creating your own JavaBeans. I also found the additional online documentation helpful.
One of JBuilder's strengths is the number of beans shipped with the product. In addition to the standard AWT beans, Borland provides improved visual beans and data-aware beans. You also get a set of beans (including a graph) from the KL Group. This extensive palette lets you create useful apps without having to install add-ons just to get started. You can add other beans to the palette — both IBM's beta version of the AS/400 Toolbox for Java and Rogue Wave's JChart product worked fine in JBuilder.
Because of its clean and simple IDE organization, I think the JBuilder Standard edition would be a good choice for programmers who want to get introduced to Java inexpensively and without a lot of ramp-up time. The fact that Borland plans specific support for the AS/400 means JBuilder may also be a tool that can scale up to enterprise development. I'll have a clearer impression of that after getting into the Client/Server Suite.
I did implement several apps that used the AS/400 Toolbox for Java to access the AS/400. With the Professional edition of JBuilder, this pretty much boiled down to source- level coding — the UI Designer was of no value in this part of the task, and I had problems getting the Interaction Wizard to generate the complete code for Toolbox bean interactions.
The one troublesome aspect of the JBuilder approach was that deleting a bean in the UI Designer didn't remove all the code generated when the bean was added — even code I hadn't touched. (Sensibly enough, JBuilder doesn't delete generated event-handling methods if you've added code to them.) This shortcoming is partially the result of not using a repository where information about a bean
The Interaction Wizard also could stand a lot of improvement. I would have preferred a nonmodal window (like the Property Inspector's) that would let me work with all the interactions associated with a particular bean. It would also be convenient if this wizard supported additional kinds of interactions (e.g., property-to-property) in addition to event-to-method interactions.
JBuilder ran solidly, although I did lock it up occasionally. A few times, a glitch in the UI Designer mishandled a bean manipulation or got out of synch with the source code. Because I know Java and have developed a good feel for the way JBuilder generates code, fixing these problems was simple. But I think a few of them could have
In summary, I had a very good impression after using JBuilder for a while, although there are some first-release rough edges that need to be smoothed out. I also haven't yet put JBuilder to the test of heavy-duty AS/400 development, so stay tuned.
Paul Conte is the editor of Java Enterprise Solutions, a new newsletter from NEWS/400. He is also a senior technical editor for NEWS/400 and president of Picante Software of Eugene, Oregon. You can reach Paul by phone at (503) 484-6318 or on the Internet at firstname.lastname@example.org.