Logo: TUG TORONTO USERS GROUP for Midrange Systems
e -server magazine

September 1997: Volume 13, Number 1

VisualAge for Java 1.0 - Let the Future Begin

By Miles Jenkins

n a recent interview, Bill Zeitler, IBM's General Manager for the AS/400 Division, was asked a very blunt question: What are you betting the AS/400 business on today? His answer, in all of two words, was "Network Computing". In the next breath, he explained that he wasn't just talking about connectivity, but about conducting business electronically, over the Internet, and largely by virtue of a superior Java environment.

It's remarkable to think that IBM is basing so much of its future on, of all things, a programming language, and on a programming language that not only didn't exist a few years ago, but also was developed by an IBM competitor, Sun Microsystems. What on earth could a new programming language offer to merit such attention? Some new killer op-code? A revolutionary new way to program a do-loop? Figure 1.

The answer is that there is not much in the Java language itself to write home about - it is a slightly simplified and streamlined version of C++, with some features that make it suitable for running applications over a network - the Internet, for an obvious example. However, Java does have the revolutionary attribute of being hardware platform and operating system independent: "Write Once, Run Anywhere" is the battle cry of the Java faithful, and when you think about it, it certainly would change the industry landscape if hardware platforms and their respective operating systems became the handmaidens of applications, not vice versa. Put a Java applet on your Web page, and it can be used, unchanged, by a Windows user in Buenos Aires, a Mac bigot in Australia, a Unix nut in Sweden, and an OS/2 diehard in Singapore (and all this with no royalties accruing to Microsoft!)

Thus, Java has the potential, at least, to break the hold that the hardware and operating system monoliths have on the computer world, and could make hardware and software tycoons like Steve Jobs and Bill Gates as obsolete in the 21st century as railway barons have become in the 20th. From IBM's point of view, if business application software were uncoupled from hardware platforms and operating systems, then computer systems could be sold on their own merits - robustness, security, manageability, etc. - and IBM no doubt feels that with the AS/400 they can compete quite well on that playing field.

Computer industry geopolitics aside, Java has become the Next Big Thing in the computer field - and if you're not constantly eager to get in on the Next Big Thing (even before you've fully mastered the Previous Three Big Things), then why the heck did you choose this industry to work in! Figure 2.

Since Java was introduced by Sun Microsystems, the Java Development Kit (JDK) has been available to be downloaded free over the Internet. The JDK (now at version 1.1) includes a Java compiler, an applet viewer, and standard class libraries. However, it is strictly command line based. If you want to design the graphical interface of your application on-screen, as well as take advantage of the other benefits of graphical integrated development environments, you have to open your wallet a bit and look at something like Borland's JBuilder, Microsoft's Visual J++, or Symantec's Visual Café. Or, as of July 25, IBM's Visual Age for Java.

The latest in IBM's Visual Age series of development environments had been available in a beta test version for several months, but recently Version 1.0 was officially released. It's available in two flavours: the Professional Edition, and the pricier Enterprise Edition, which adds support for team development, as well as "Enterprise Access Builders" - tools for developing components to connect a Java client to various database platforms. Within the Visual Age for Java environment you can create both applications and "applets" - Java programs that can be embedded in an HTML document and run by Web browsers which implement the JVM (Java Virtual Machine). (Note that Visual Age for Java includes its own JVM as well as an applet viewer, so you can view and test your programs locally). VA for Java also has a version control capability, and a debugger is included.

The Professional Edition is priced to compete with its counterparts mentioned above - that is, in the 100 - 200 dollar range per license. However, if even that amount is a deterrent to you, the neophyte dabbler in Java, you may be interested to know that you can download a free copy of the Entry Edition - which contains all the functionality of the Professional Edition, minus only the documentation and online help, and limited to the creation of 100 classes. In the remainder of this article, I'll show how you can download and install the Entry Edition of Visual Age for Java, and have a quick look at some of its features.

First, you'll have to consider the prerequisites, which are pretty significant, particularly for RAM. You'll need Windows 95 or Windows NT 4.0 or OS/2 Warp V4, an SVGA display, and, IBM says, 32MB of RAM (with 48MB recommended), at least 45MB of free disk space for the software (with an additional 30MB free disk space for swapping), and lastly, an unzip program.

If you're still standing, here's where you can find the Entry Edition on the Internet: www.software.ibm.com/ad/vajava. (Before downloading it, you should uninstall any Beta versions of the product from your system). The Windows version of the download file (wenty100.ZIP) is a single .ZIP file almost 22MB in size - so you'll finally be able to wallpaper that bathroom while it's downloading. Download it into a temporary directory, then unzip it. One of the unzipped files is a setup.exe file, which can be invoked to complete the installation. There is also an install.txt file with further installation and troubleshooting information. After a successful installation, you'll have an "IBM Visual Age for Java" icon on your desktop to invoke the program. It will bring up the Workbench window seen in Figure 1. It will also bring up the "Quick Start" window seen in Figure 2 (which also can be brought up at any time from the Window… Quick Start… menu option). If you select to create a new applet, as shown, you will be taken to a Smart Guide window (comparable to a Windows 95 "wizard"), which prompts you for applet name, project, and package, and whether you want to design the applet visually, or write source code for it. If you select the former, the Visual Composition Editor is invoked (Figure 3). Figure 3.

The Visual Composition Editor allows you to create a graphical interface, with all the usual components - buttons, lists, menus, entry fields, etc., which it calls (in yet another of those coffee metaphors which are already becoming tiresome) "beans". These are selectable from the left hand side of the window. Beyond just laying out an application window, basic application logic can be constructed by making connections between components in the window (marked out with the dashed line), or with non-visual components outside the window. In the example shown, the Remove button has been connected to the list, to indicate that clicking Remove should delete the highlighted item from the list. The source code for this event logic is then generated automatically. With Version 1.0, "beans" for all the standard Java Class Libraries are available. In future, more sophisticated - and AS/400-specific - components will accessible, allowing, for example, access to files and fields in DB2/400, analogous to using externally described files in RPG/400.

Regardless of how many pre-built components, or "beans", are available, there will always be a requirement for new classes in any custom application. VA for Java of course enables the creation of such classes in the old fashioned way - typing source code - with Smart Guides that prompt you and provide some of the fundamental class definition code. And even if you are programming the old fashioned way, the VA for Java environment makes life easier by making instantly accessible the definitions of all the classes on the system and their methods, organized by their respective packages, whether standard Java classes or your own previously created classes (see again Figure 1). If, like me, you've tried to learn and program Java from one of the many books available today, you may have been frustrated by not having access to such comprehensive documentation of the numerous standard Java classes.

What I've given above is just a quick overview of IBM's Java development environment - and admittedly not much reference is made to where the AS/400 comes into all this. The AS/400, as of V3R7, does not currently natively support Java applications - a coming release of OS/400 will rectify that. And as of the time of writing this article, much of the AS/400-specific Java development capability is still under construction. In future articles, I hope to explore more AS/400-related capabilities of Java as they become available. In the meantime, the latest scoop from IBM is of course available on the Internet, at www.software.ibm.com/ad/vajava. T < G