The Silicon Mule

Dueling Java classes from Netscape and Microsoft vie for supremacy.

All products featured on WIRED are independently selected by our editors. However, we may receive compensation from retailers and/or from purchases of products through these links.

Isaac Asimov's Foundation and Empire series made a big impact on me when I read it back when I was 10. The stories chronicle the dying days of the First Galactic Empire and the establishment of the Foundation, a center of science and learning which is somehow supposed to help rebuild a Second Galactic Empire. The whole thing has been predicted, of course, by a professor named Hari Seldon and his science of psychohistory. But something goes wrong when a strange Mule with phenomenal mental powers is born, who starts his own empire and changes the course of human evolution.

Netscape's Foundation is the Internet Foundation Classes, a class library written from the ground up in Java and built for creating full-featured, complex, mission-critical applications. IFC is a complete class library that contains classes for more than a dozen different kinds of user-interface objects, including a multifont text editor, support for drag-and-drop, a color chooser, a font chooser, and of course the standard assortment of scroll bars, sliders, text fields, menus, windows, and more.

Microsoft's Foundation, meanwhile, is the Application Foundation Classes, another collection of Java classes for creating full-fledged application programs. Engineers at Microsoft created AFC because they too couldn't stand the limitations of Sun Microsystems' Java Abstract Window Toolkit, or AWT - Sun's Java application development environment. In particular, they wanted to be able to easily subclass user-interface elements to subtly change their behavior; using AWT, this is remarkably difficult to do.

Both Netscape and Microsoft are distributing their application kits royalty-free. Both say they will be building the classes into future releases of their Web browsers. Both seem to be saying that they really aren't interested in using their foundation classes as competitive advantages - they just want to give programmers a better environment for writing code than Sun's AWT.

But there are deep differences between the two Java-based foundations. Microsoft's AFC is built as an extension to Sun's AWT. You can actually mix calls to AWT and AFC in the same Java applet. Because AWT uses the built-in primitives in each operating system to display push buttons, create scroll bars, or manipulate pop-up lists, programs that use AWT look different and sometimes run differently on different Java platforms.

Netscape's IFC, meanwhile, is written entirely in Java. As a result, applications written to use IFC look exactly the same on every platform. They also seem to run a lot faster, although as yet I'm at a loss to explain why. Perhaps it's just better designed.

Of course, I'm biased. IFC is modeled almost entirely on Nextstep, the object-oriented application development environment that was developed by NeXT Software (and recently acquired by Apple Computer). The class libraries were written primarily by Jayson Adams, who used to write demo programs for NeXT tech support before leaving NeXT and setting up shop with his partner Scott Love. The two created a company named Millennium, and another called NetCode. It's Net Code that wrote IFC and a companion program, Constructor. The company was sold to Netscape last March.

My sources say that IFC is better than Nextstep in a few ways, but it's basically the same because Objective-C, Nextstep's object-oriented language, has an object model that's very similar to Java's. So it's relatively easy for old Nextstep programmers to port their wares over to Java.

One of the first applications ported was Create Java, written by my friend Andy Stone at Stone Design. Create Java is a full-featured drawing program with a lot of cool effects and gizmos. Andy's actually done quite a few Java applets with IFC that are all on his Java Objects and Gizmos page.

Another application is Pencil Me In, a neat Java-based scheduling application from Sarrus Software that's being distributed over a Marimba channel. (As a matter of disclosure, you should know that Sarrus also sells an address book that I wrote back in 1992 called SBook; I'm hoping that they rewrite that one in Java as well.)

One of the problems with these class libraries is that they aren't built in to the current generation of Web browsers. This means they have to be downloaded with the applet - a time-consuming process - or they have to be separately downloaded by users and installed in their Java ClassPath libraries.

Future versions of Navigator and Internet Explorer are sure to include one of these class libraries. Unfortunately, it's unlikely that Microsoft will want to include IFC in theirs, and it's unlikely that Netscape will want to include AFC in theirs.

All this spells confusion for users, who are now going to have to know if they are using an AFC-based Java application or an IFC-based one. Unless Netscape and Microsoft work out their differences, this is likely to be one more thing shattering the promise of Java to provide a write-once, run-anywhere platform.

I'd like to point you to some neat programs written with Microsoft's AFC, but I don't know of any. According to Microsoft, "We are not prepared to comment on these unannounced products specifically. The reason we developed AFC is that our internal Java application efforts quickly discovered there were no good 'industrial strength' class libraries on the market, so building on our extensive Windows experience, we developed AFC and decided to make them available to all developers."

Gosh, Microsoft should just have downloaded Netscape's IFC classes. It would have saved them a lot of time.

So here's my question. If Bill Gates is Hari Seldon, and if the reign of Microsoft is supposed to last a thousand years, then is it just possible that some Mule out of Silicon Valley will upset the Galactic Empire and lay waste to the best-laid plans of the millennium?

Stay tuned.