Four Mac-based IDEs compared: Which should you choose?

We weigh the pros (great UI, ease of use) and cons (no JDK 1.1) of the Mac as a Java development platform

When Java first appeared on the scene (way back in 1995), Macintosh support for the new language was non-existent, and Sun's plans for porting Java to the Mac were vague and non-committal. By 1996, with the release of the first generation of Mac-hosted Java integrated development environments (IDEs), things had improved somewhat -- at least there was something that would run on a Mac -- but the situation was far from ideal. (In August 1996, JavaWorldpublished my article, "March of the Mac IDEs," a comparative review of some of those IDEs.) The first crop of tools were, at best, beta quality, and many who would rather have worked on their trusty Macs found themselves switching to PCs, and even Unix boxes, for their Java development. Moving to the PC wasn't that bad; after all, there are a wide variety of IDEs for the PC. Unix developers aren't quite that fortunate, but at least most Unix platforms support version 1.1 of the Java platform, something Mac Java developers are still waiting (sometimes quite impatiently) for.

Mac developers no longer have to be content with the beta-quality IDEs of the past; however, these same developers are, just the same, experiencing an uneasy feeling of déjà vuas the rest of the development world is starting to cut its teeth on JDK 1.1.3. With the viability of the Mac OS as a Java development platform in question, some of us are still doggedly determined to prove that Java can fulfill its promise as a cross-platform language, allowing us to work where we feel most comfortable, where we are most efficient, and most of all, where we are happiest -- the Mac OS.

In an effort to determine just how viable a platform the Mac is for Java development, I conducted a comparative review of Mac-hosted Java IDEs. I focused on tools currently that are available in final-release versions for the Mac platform, avoiding those that are either still in alpha (such as Marimba's Bongo GUI development environment), or beta (such as Visix Vibe), and those that require Java 1.1 in order to work (such as JavaSoft's Java Workshop). Also, although I did not review Apple's Macintosh Runtime for Java (MRJ) as a development tool -- it's not an IDE -- I did include it in performance tests, because most of the tools are moving toward replacing their built-in VMs with MRJs. See the sidebar Apple Mac OS Runtime for Java (MRJ) for more information on MRJ.

If you just can't wait to see how the tools fared, take a look at the following table, which provides a quick rundown of each tool's features. Each of the tools, along with the company contact information, is listed in the Resources section of this article.

Tools at a glance
Roaster Cafe Visual Cafe

CodeWarrior Pro/

Discover Programming for Macintosh

Price 99.9599.95CodeWarrior Pro: 99
Discover Programming for Macintosh: 9
Pros Superior user interface; fastest JIT; reasonable VM performance; great debugger; supports duplicate filenamesFastest compilerMost advanced GUI development support; moving toward support for Java BeansExcellent user interface; most stable VM; very fast JIT; best support for native methods; support for Object Pascal, C, C++; CodeWarrior Pro includes tools for Windows 95/NT; Discover Programming for Macintosh is very inexpensive
Cons JIT is still beta; VM not as solid as CodeWarrior; no JDK 1.1 support until MRJ 2.0Poor support for application development; no JDK 1.1 support; outdated documentationMajor stability problems, inadequate documentationUser interface cluttered by C, C++, Pascal features, CodeWarrior Pro is not cheap; can't develop commercial software with Discover Programming
Create Double- Clickable Apps from IDE YesNoNoYes (requires CodeWarrior VM)
Free Trial Version Available YesNoYesNo
Native Method Support NoNoNoYes
JDK 1.1 Support Dependent on MRJ 2.0 (not yet released)NoneDependent on MRJ 2.0 (not yet released)Pre-release Metrowerks VM available
Includes JIT Yes (beta quality)YesYesYes
68K Support YesYes (no JIT for 68K)NoYes (no JIT for 68K)
Extras Comes with ObjectStore PSE, ObjectSpace JGL, OpenLink database connectivity software, Netscape's IFCComes with Introduction to Java in PDF formatIncludes libraries of useful GUI widgetsBoth CodeWarrior Pro and Discover Programming include Learn Java on the Macintosh (and several other books on C, C++, etc.) in PDF format, ObjectStore PSE, ObjectSpace JGL, Netscape's IFC
Bottom Line If you develop on the Mac because having a good user interface is important to you, Roaster is an excellent choice for Java development.If Symantec wants to keep discerning Mac developers interested in its tools, it needs to think about upgrading Cafe, or discontinuing it in favor of Visual Cafe.Visual Cafe is an ambitious product that has not yet realized its potential.CodeWarrior Pro is the premiere power tool for Mac-hosted development in any language. For those just starting out, there is no better deal than Discover Programming for Macintosh.

The tools -- an overview

This section provides an overview of all the tools I reviewed. As I mentioned earlier, I chose only those tools that are in final release. Here's a list of those tools that made the cut:

  • CodeWarrior Professional/Discover Programming for Macintosh from Metrowerks
  • Roaster 3.0 from Roaster Technologies
  • Cafe 1.5 and Visual Cafe 1.0.1 from Symantec

Metrowerks CodeWarrior Professional/Discover Programming for Macintosh

Click image for expanded view (77K)

In the foreground is CodeWarrior

Pro's clas browser, with the toolbar

above it. Behind that, the class

hierarchy viewer is visible, and

in the background, CodeWarrior's

project manager.

With CodeWarrior Pro Release 1 (sometimes referred to as CodeWarrior 12), Metrowerks has merged its Mac-hosted and PC-hosted development environments into one package, replacing the separate versions of CodeWarrior previously available for Mac and Windows. Included on the three CodeWarrior Pro CDs are compilers for several languages in addition to Java, including Object Pascal, C, and C++, all of which are hosted within a new version (2.0) of the CodeWarrior IDE. The project formats are not yet the same across platforms, so Mac users and PC users can't currently share CodeWarrior project files.

With its multi-language, multi-platform support, CodeWarrior Pro (priced at 99) may be overkill for someone who is just getting started or who has no need for Pascal, C, and C++ compilers.

Metrowerks, however, doesn't dismiss beginners. To support those new to Java development on the Mac, the company offers Discover Programming for Macintosh. At only 9, this package includes just the Mac-hosted tools from CodeWarrior Pro (including support for Java, C, C++, and Object Pascal) -- a remarkable deal. The license does not allow you to develop commercial software, though, so if you're a professional developer, Discover Programming is not an option. If you're a student or an educator who would like the full power of CodeWarrior Pro, you may qualify for academic pricing. (Contact Metrowerks for more details.)

As with all of the IDEs reviewed in this article, CodeWarrior supports Java 1.0.2 and includes both a JVM and a Just-In-Time (JIT) compiler (PowerPC only). In addition, Metrowerks gives you a sneak preview of its tools for JDK 1.1. Check out the Thrill Seekers folder on the installation CDs for these pre-release versions of CodeWarrior tools with 1.1 support.

Shortly before this article was published, Microsoft made available a pre-release version of Internet Explorer 4.0 for Macintosh, including a new JVM and JIT supplied by -- you guessed it -- Metrowerks. The Metrowerks VM included with this version of IE 4.0 includes full support for all aspects of Java 1.1 except RMI (Remote Method Invocation) and JNI (Java Native Interface). Metrowerks has promised a soon-to-be-released update for CodeWarrior Pro with full support for Java 1.1, including JNI and RMI.

Roaster Technologies Roaster 3.0

Click image for expanded view (45K)

In the foreground is Roaster's class

browser, with the class tree viewer

visible behind it. In the upper-left

corner is Roaster's package-oriented

project manager. Notice the menus next

to each file, which allow the user to

navigate directly to any method defined

in that file. Notice also the Scripts

menu in the menu bar. Users can easily

write their own scripts and have them

show up here simply by adding them to

Roaster's Scripts folder.

Release 3.0 is the first final release of Roaster, following a string of Developer Releases. New in version 3.0 is an optionally enabled JIT (still considered beta quality) for both PowerPC and 68K Macs, many bug-fixes, a stable debugger, the ability to build libraries in zip format, and a generally improved IDE. There are also a few bundled third-party libraries supporting database access among other things. At the MacWorld Expo in Boston, Roaster Technologies' John Dhabolt demonstrated Version 3.1 (not yet publicly available), which allows developers to choose between Roaster's VM and the MRJ VM. This means that when MRJ 2.0 is available, Roaster 3.1 will support Java 1.1 via MRJ 2.0.

Symantec Cafe 1.5 and Visual Cafe 1.0.1

Click image for expanded view (38K)

Cafe's editor window is in the

foreground, with the class browser

visible just above it. On the right are

two project manager windows for

different projects. Notice that Cafe's

class browser is unable to find the

selected function even though it is

part of the current project.

Symantec's Java tools for the Mac come in two flavors: Cafe and Visual Cafe. Cafe is a standard, Java-only IDE, with its own VM and a JIT. For the most part, other than bug fixes and the addition of a 68K/PowerPC JIT, Version 1.5 of Cafe is not significantly different from Developer Release 2.0, covered my last comparative review of Mac IDEs for JavaWorld. (Mentioned at the beginning of this article, you can also find a link to it in the Resources section.)

Despite the similarity in name, Visual Cafe is a substantially different product from Cafe. Not merely a visual tool living alongside, or grafted onto, the same old Cafe IDE, Visual Cafe is a development environment designed from the ground up with visual development in mind. It strives to let developers create complete Java applets and applications -- not just layout components on screen -- without ever writing a line of code. "Serious" developers may scoff at this idea, and, of course, there are limitations to the concept; Symantec recognizes the limitations, so Visual Cafe doesprovide a full-featured IDE.

Click image for expanded view (70K)

This figure shows how easy it is to add

menus to an application in Visual Cafe.

The property list on the right is

dynamically updated as you manipulate

objects graphically. GUI components

can be dragged and dropped from the

toolbar palette on the top of the

screen directly onto a mock-up of your

running application. This figure shows

only a few of Visual Cafe's libraries

of components, but there are many more.

It's a pity Visual Cafe is so unstable,

because in terms of its design, it

shows evidence of real genius.

Coming soon from Symantec is Visual Cafe Pro for the Macintosh (already available for Windows). On the Windows platform, the main difference between Visual Cafe and Visual Cafe Pro is that the Pro version is bundled with Symantec's dbANYWHRE Workgroup Server, Sybase SQL standalone version, and Netscape FastTrack Server. However, none of these additional products currently exist for the Macintosh, so it's hard to tell in advance what the Mac version of Visual Cafe Pro will actually look like.

Furthermore, Visual Cafe on the Mac is so unstable that it seems Symantec's development team will have their hands full for a while just fixing bugs. Perhaps this is part of the reason that Visual Cafe Pro for the Mac is behind schedule (it was originally slated for an August ship).

Evaluation criteria

I've evaluated the tools with respect to the following criteria:

  • User interface: How intuitive is the product's interface? How Mac-like is it? To what extent does it actually speed development relative to other platforms? "What kind of documentation is provided with the product?"

  • Performance: How well does the VM perform? How fast is the compiler? How stable is the product overall?

  • Functionality: To what extent does the tool provide a full-featured development environment? Does it allow the developer to create double-clickable Mac applications? Does it support native methods? What version of the Java platform does it support?

User interface: Roaster rules the roost

The single most important reason Mac users prefer Macs is that the user interface helps us get our work done faster and with less hassle. This is a very hard thing to quantify, but as you work with a tool regularly, you begin to get a feel for whether the tool is helping you or hindering you.

Developers want tools that allow them to navigate their code in logical ways -- class browsers, hierarchy browsers, method menus, etc. -- without making them jump through hoops. If it takes half an hour to find the right dialog box to turn on the class browser, for example, you lose whatever advantage the class browser provides. Documentation is also a crucial part of an application's user interface. No matter how intuitive the graphical user interface of an IDE is, you're still going to have to turn to the manual at some point. When you do, you want it to be easily accessible, clearly written, and comprehensive.

Editors: It's all in the toolbar

All of the IDEs contain high-quality, syntax-colored source code editors with support for pane-splitting, drag-and-drop text editing, find and replace, and regular expressions. Each editor also includes a convenient pull-down menu at the top of each editing window that allows you to jump to any method declared in the current file.

All of the source code editors are superior to any available on the Windows 95 or NT platform (isn't it nice that Command+F alwaysmeans Find on a Mac?). I prefer Roaster's editor largely because of the toolbar at the top of each editing window. If you prefer to use an external editor, such as BBEdit or Alpha, you'll want to use CodeWarrior or Cafe; Roaster won't stand for it.

Project managers: Duplicate filenames a problem

All of the project managers support multiple open projects. Symantec's and Metrowerks' project managers support subprojects, which can be useful for highly complex development work. Roaster's project manager is structured around the concept of the Java package, so although Roaster does not support subprojects, the project manager is still quite easy to use.

All of the project managers support the dragging and dropping of files and folders (complete with files) from the finder into the project window, but there are some caveats. Most notably:

  • If you drag a folder of files onto the project window in Cafe or Visual Cafe, and the path to each source file, as determined by its fully qualified name, does not begin with the Project Folder, Cafe may have trouble finding imported classes from these source files. The solution is to make sure that if you have, for example, a source file for a class named com.pencom.tools.Sorter, it is located in the folder :{Project Folder}:com:pencom:tools:. If you want the class files to be output in such a way that they don't mingle with the source files, you need to explicitly set the Package Directory option in the Project Options dialog. CodeWarrior and Roaster don't have this requirement; your source tree can be rooted wherever you want it to be. In fact, with Roaster you can't set a destination directory for compiled class files.

  • Of the four IDEs, only Roaster correctly allows you to have duplicate source file names in different packages. As a result, if you have, for example, two protocol handlers named com.pencom.net.gopher.Handlerand com.pencom.net.ftp.Handler, neither CodeWarrior, Cafe, nor Visual Cafe will let you add both sources to your project, even though they are in different folders. In some languages, this may be a feature, but in Java, it's a serious bug. Not only does Java allow duplicate filenames in different packages, but some of the core Java APIs, such as the URLConnection/ProtocolHandler mechanism, require them.

  • Dragging and dropping a large number of files into a Roaster project can be excruciatingly slow; as you add files to your project, Roaster dynamically updates the data structures used for the class browser and class tree.

CodeWarrior Pro's project manager is rather complex because it is designed to be used for multiple languages, multiple targets, and multiple platforms. Metrowerks has improved the intuitiveness of its Java support since CodeWarrior 9, but it could still be easier. For instance, if you want to use a library of existing code from a zip file, you must add it to your project; simply placing the zip file somewhere in the project's access paths is not enough, and zip files themselves cannot be added to the access path. Once you've added the desired file, you must then remember to go into the Info page for that item in the project and select the Import Weak option unless you want the library classes to be output along with the classes generated from your source code.

Cafe is descended from Symantec C++ and uses the standard Symantec project manager. Using this IDE, it's clear that it was once meant to support languages other than Java, but most of those features are disabled, and there are several places where you find "choice" menus with only one choice. These afterthoughts makes the IDE clunky to work with. Visual Cafe, on the other hand, doesn't use the standard Symantec project manager and is geared specifically toward Java development. Visual Cafe adopts a higher-level view of program components and is more object-centric than file-centric. If you're a coder -- even an object-oriented coder -- you may find this approach a little disconcerting at first, but you'll get used to it quickly.

Roaster's project manager is simpler than the others. It's simpler than CodeWarrior's and Cafe's project managers because it was designed from the ground up as a Java-only environment -- there are no extraneous, irrelevant controls cluttering up the user interface; it's simpler than Visual Cafe's project manager because it does not aim to provide an IDE and a visual GUI builder all in one package.

Class browsers: Getting there is half the battle

All of the IDEs feature Smalltalk-style class browsers and graphical hierarchy viewers, which can go a long way toward facilitating object-oriented development. All of the environments could use some improvement, and perhaps some standardization, in how they provide access to the class browser.

CodeWarrior's New Class Browser item is located in the Tools menu, but it's mysteriously grayed out. To enable this command, you must go into the project settings dialog, find the Compiler Output panel, and select Activate Browser. Then, to use the browser or hierarchy tools, you must recompile your project, which, I might add, is painfully slow (see Compilation Speed). Once you do work through that process, however, the class browser works quite nicely, and the hierarchy is very easy to use.

Cafe's class browser, which also requires you to compile your code before using it, is very impressive, combining the class tree and class browser into a single, highly configurable tool. Symantec has improved Cafe's class tree since the Developer Release 2 version -- inheritance lines are drawn much more neatly, at right angles; no more web of crossed lines from the center of each object to each of its descendants.

Visual Cafe uses a class browser very similar to (but slightly less configurable than) that of Cafe. Unfortunately, if you work with multiple packages stored in a hierarchy of folders, Visual Cafe's class browser cannot handle navigating the hierarchy to find all of your classes, including those it has already compiled.

Roaster's New Class Browser and New Class Tree items are buried in the File|New submenu, but once you find what you're looking for, you're in for a nice surprise. Roaster's approach to the class browser is, in my opinion, the most user-friendly. You don't have to compile your code to use it, and the browser display is dynamically updated as you edit your code. The editor pane of the class browser includes the same toolbar as the standard Roaster editor window, which is quite handy. Roaster's class tree still sports a few bugs, however; for instance, if you're adding several source files to the project via drag-and-drop, and a subclass gets added before its superclass, the tree will not show these classes as joined by an inheritance relationship until you save the subclass file again. (This is a reproducible bug; you can try it with the source code to Jigsaw -- which, incidentally, is included on the Roaster 3.0 CD.)

Debuggers: Big differences

Debugging is one dimension on which the environments differ substantially. I couldn't get the Visual Cafe debugger to work without crashing (regardless of whether the JIT was turned on), so I'm afraid there's not much I can say about it. Cafe's debugger works, but it has some strange bugs itself. For example, if you run it with your monitor set to greater than 256 colors, all of the debugger windows are entirely blacked out. Once you get it running, however, its use is fairly intuitive, but less so than the Roaster and CodeWarrior debuggers.

Racking up yet more user-interface points, Roaster's debugger was a cinch to use, and it worked flawlessly the first time. The windows are so well organized that it's immediately apparent how to use them. While debugging your program, you can see the current call chain and a list of executing threads, examine and edit the values of local variables, and see the contents of the runtime stack. CodeWarrior's debugger is not far behind Roaster's in ease of use, but many of the features (such as watchpoints and expression evaluation) it supports for other languages are not supported for Java. Rather than features, you get a number of permanently grayed-out menu items that make the debugging process less intuitive.

All of the debuggers could benefit from a greater complement of advanced features. None support watchpoints or expression evaluation (although CodeWarrior supports these features for languages other than Java). Another useful feature would be conditional breakpoints.

Visual GUI builders: Limitations abound

All of the tools come with some degree of support for visual GUI building, but the only one that really stands out in this respect is Visual Cafe because it was designed with GUI building in mind. Visual Cafe comes with a library of components and, in a future version, will support JavaBeans, so you can add third-party components. In terms of concept (if not implementation), Visual Cafe really shines here. But there are two very serious drawbacks: First, if you have existing GUI code and try to bring it into Visual Cafe, you may have difficulty with Visual Cafe automatically editing parts of your program (to their detriment) that were working just fine. Second, Visual Cafe is still so unstable on the Mac platform that you may find it difficult to get anything accomplished at all. Visual Cafe is a great idea that is poorly implemented.

CodeWarrior's Constructor for Java is less ambitious; it merely provides a tool for laying out your user interface. After that, you are expected to edit the code yourself to provide more functionality. It takes a while to get used to the way Constructor for Java works, but it does a reasonable job at what it sets out to do.

The Roaster Interface Brewer (included with Roaster) and Cafe Studio (included with Cafe) are both quite limited in capability, supporting only the bare minimum of AWT components. These tools have changed little, if at all, in a year's time; they seem to be included more for marketing reasons than to meaningfully enhance the functionality of their respective parent products.

Documentation

You won't find any more than the most rudimentary paper documentation in any of these packages. Most of the tools provide documentation through Adobe Acrobat (PDF) files, the exception being Visual Cafe, whose documentation is provided through Apple Guide files. Although this is clearly a matter of personal preference, I find that I sometimes want to know how to do something, without necessarily being forced to do it, as Apple Guide tends to do. Interactive help like this can be great, but it should not stand in for traditional documentation. To make matters worse, Visual Cafe's Apple Guide documentation is woefully incomplete. Try searching for the string "zip" or "bundle" and you'll get nothing, even though Visual Cafe has a menu item called Bundle Classes.

Roaster's documentation was not quite ready when the CD went to press, so an incomplete version was supplied on the CD. The final version is now available over the Internet in PDF format. The final version is quite complete and well-written.

CodeWarrior has the most impressive and thorough documentation, including both PDF and Apple Guide files. Because CodeWarrior's documentation is spread across multiple PDF files, sometimes it can be difficult to find the documentation you're looking for. The potential hassle of searching through multiple files is lessened because Metrowerks supplies cross-file indexes for Adobe's Acrobat Search utility, allowing you to search multiple PDF files for a textual match.

CodeWarrior and Cafe both come with complete books -- in PDF format -- on how to program in Java, and include project files for all of the examples in the PDF books.

Performance: JIT happens

Because each environment comes with a JVM (and a JIT), as well as a compiler, I've evaluated performance in the areas of runtime performance and compilation speed. I've also included overall stability in this category; a product that crashes your Mac is certainly not performing up to snuff.

Runtime performance

To measure runtime performance of the VMs and JITs, I used the CaffeineMark 2.5 Java Benchmark from Pendragon Software. (For more discussion of Java benchmarks, see the sidebar "Java benchmarks.")

I ran the tests an Apple Power Macintosh 9600/200MHz running Mac OS 7.6.1, with 32 megabytes of RAM and 4 gigabytes of hard disk space. For comparison, I've included test results for Netscape's VM in the table, as well. (Note: At the time I ran my tests, MRJ 1.5 was still in beta. The version tested was 1.5b1.)

Macintosh VM Results
Virtual Machine

Overall CaffeineMark Score

(higher scores are better)

Metrowerks Java 1.0.7310
[details]
Roaster 3.0261
[details]
Netscape 3.01 Gold234
[details]
Mac OS Runtime for Java 2.0d2 (pre-release)229
[details]
Mac OS Runtime for Java 1.0.2203
[details]
Cafe 1.5164
[details]
Visual Cafe 1.0.1158
[details]
Macintosh JIT Results
JIT

Overall CaffeineMark Score

(higher scores are better)

Roaster 3.0 (beta)3046
[details]
Metrowerks Java 1.0.72753
[details]
Mac OS Runtime for Java 1.5b1 (beta)2455
[details]
Cafe 1.51074
[details]
Visual Cafe 1.0.11070
[details]

In truth, the speed of the VM that comes with an IDE is of debatable importance. After all, you're probably not developing code so that only other people with the same IDE can run it. More likely, they're going to run your program in a browser, or on whatever other VM they have handy. The really important VM to pay attention to is actually the one that's not part of an IDE: MRJ. As MRJ matures, there will be less and less need for Mac-hosted Java IDEs to include their own JVMs. The only reason that they do so now is that JavaSoft has done such a poor job of coming out with adequate VMs for the Mac.

JavaSoft is now working more closely with Apple, and has basically turned over the task of developing the next Mac JVM to Apple. In effect, Apple's MRJ is the next Mac JDK. Currently, all of the IDEs have beta or seed versions that can run with MRJ; none yet support debugging under MRJ, but will soon. In short, it looks like the IDE developers are eager to get out of the VM game. The only exception to this is Metrowerks, which is well on its way toward beating Apple to the punch in delivering a high-quality, stable implementation of Java 1.1 platform, having delivered the nearly 1.1-compliant VM bundled with Microsoft's Internet Explorer 4.0 (pre-release).

Compilation Speed

To test compilation speed, I downloaded the source code for ObjectSpace's Java Generic Library (JGL) version 2.0.1, and compiled it separately in each IDE. JGL is a project of moderate size, containing just under 100,000 lines of code in 178 source files. Because none of the compilers includes support for automatically timing compiles, I timed these by hand using a stopwatch.

Roaster is the only IDE that still uses Sun's javac compiler; Metrowerks and Symantec have developed their own native compilers for the Mac. Because Roaster uses javac (which is itself written in Java), I felt it was worth testing both with and without the Roaster JIT; the difference in performance was quite significant. Notice also the difference in CodeWarrior's compilation speed with and without the class browser activated. Interestingly enough, Cafe's class browser is always activated, and, unlike Roaster, which builds the class browser data structures dynamically, Cafe builds these structures during compilation, which makes its top-ranking compilation speed even more impressive. This is one area in which Cafe's superiority on the Windows platform carries over to the Mac platform; Cafe's Java compilers for Windows are blindingly fast.

Macintosh Java Compiler Comparison
Compiler

Time to Compile JGL 2.0.1 for JDK 1.0.2

(shorter bars are better)

Cafe 1.51:22
CodeWarrior Pro 11:22
Roaster 3.0 (JIT beta)2:27
Visual Cafe 1.0.12:27
Roaster 3.05:06

CodeWarrior Pro 1

(Class Browser Activated)

5:45

Stability: CodeWarrior is king

In terms of stability, all of these tools show marked improvement in the past year. It's still possible to find yourself dropped into MacsBug now and then, especially when you're running highly multithreaded code, or code that uses the network a lot. Still, it's hard to tell whether to blame this on the VM implementations, on Open Transport, or on the Netscape browser, which I often had running along with the VMs while stress-testing them. All of the VMs were able to run the Jigsaw Web server, at least for a while, without crashing. However, I managed to crash each of them eventually, except for Metrowerks' VM. Metrowerks' JIT was also notably stable, but I was able to crash it eventually. (See the sidebar "How I crashed the VMs" for more information.)

Ultimately, though, instability problems are found primarily in the VMs or the JITs, not in the development environments themselves -- with the notable exception of Visual Cafe, which behaves much more like a beta than a final release. Development tool vendors initially had to provide VMs because there weren't any. Once Apple provides a stable, full-featured JDK 1.1 for the Mac, IDE vendors will be able to support this standard.

Functionality

This section examines the level of support each tool provides for JDK 1.1, creation of standalone double-clickable applications, native methods, and 68k support. In most of these areas, CodeWarrior is clearly ahead of the pack, except for creation of double-clickable applications, where Roaster has a slight edge.

JDK 1.1 support

At the time of this writing, JDK 1.1 support on the Mac is virtually non-existent, but the tide is changing. As I mentioned earlier, CodeWarrior Pro comes with a pre-release version of Metrowerks' 1.1-compliant Java VM (in the Thrill Seekers folder, which is not installed by the standard installer). A later and more stable version of this same VM comes with Microsoft's preview release of Internet Explorer 4.0.

Apple has made available -- to a select group of developers -- a pre-release version of MRJ 2.0. Roaster Technologies and Symantec have versions of Roaster and Visual Cafe ready to go that support running with MRJ 2.0. All they're waiting for is Apple to release MRJ 2.0.

Creating standalone applications: Roaster and CodeWarrior make it easy

A year ago, the main goal of most tool vendors seemed to be to provide support for applet development, with support for developing standalone applications added almost as an afterthought. This year, the IDEs are taking a wider view of Java's capabilities.

Since the debut of Metrowerks' first Java tools, CodeWarrior always had the ability to create standalone applications, classes bundled into ZIP files, and applications that would run when double-clicked in the Finder. Since then, CodeWarrior's interface for accomplishing these things has become much more intuitive.

Roaster now supports these features as well, and the process is also quite intuitive. Furthermore, Roaster is the only one of the Mac IDEs that allows you to create a double-clickable application that includes a built-in Java VM, so you can distribute it to Mac users who don't have a Java VM pre-installed on their machine. When you create the double-clickable application, Roaster looks through your project to make sure it includes only those class files that are actually referenced in your code; this helps limit the disk footprint of the application. The Roaster VM itself (excluding any class files) is approximately 1.7 Megabytes on disk.

Cafe and Visual Cafe support the creation of Java applications that you can run from within the IDE, but they do not support creation of zip files from within the IDE, nor do they enable the developer to create double-clickable applications. Visual Cafe has a menu item named Bundle Classes, but it is not mentioned in the documentation at all, and when I tried it, it didn't have the expected effect. (To be honest, I couldn't tell what effect it was supposed to have, because all it did was complain that it was unable to find "classes.zip".) Cafe "supports" the creation of zip files by dragging class files on a separate application called Symantec Zip. Symantec Zip is pretty straightforward and easy to use, considering that it has virtually no user-interface and is undocumented except for a one-line mention of its purpose in the release notes.

Double-clickable applications created by Roaster or CodeWarrior work by automatically running either the CodeWarrior or the Roaster VM. In the case of Roaster, the VM is embedded in the application; in the case of CodeWarrior, you need to have the CodeWarrior VM separately installed, which means that double-clickable applications created by CodeWarrior are not currently a viable distribution solution. Future versions of CodeWarrior and Roaster will allow the creation of double-clickable applications that will automatically run using the MRJ VM. This solution will require previous installation of MRJ, but at least MRJ ships with the Mac OS, and is freely distributable by developers. This distribution model is similar to that of multimedia applications, which often require QuickTime 2.5 or later in order to run and include a copy on the installation CD.

Currently, if you want to create double-clickable applications to run with MRJ, you need to use the JBindery tool (included in the MRJ SDK). There are several ways to do this, the easiest being to create the classes in one of the IDEs, build them as a zip file, and then drag the zip file onto JBindery in the Finder. JBindery is pretty easy to use and chooses smart defaults based on whether you started it up directly or via drag-and-drop. One feature of JBindery whose use is not immediately obvious is the Virtual File System. This feature provides a way of bundling support files (properties, resource files, and the like) into the application. Remember, though, that double-clickable applications created with JBindery still require previous installation of MRJ.

Native methods: CodeWarrior delivers (or does it?)

Of the IDEs I reviewed, only CodeWarrior provides support for creating classes that take advantage of native methods. Because nobody has yet provided a full release of a JDK 1.1-compliant VM for the Mac, you still need to use either 1.0.2-style native methods (if you build with CodeWarrior), or the outdated Netscape JRI-style native methods (if you use MRJ's JManager API), instead of the newer JNI. Version 2.0 of MRJ will support JNI (it's part of the Java platform 1.1 specification) and JRI, but the latter only for backward compatibility. Even in CodeWarrior, support for 1.0.2-style native methods is being phased out in favor of JNI; however, none of its VMs, pre-release or otherwise, support JNI yet.

68K support: Forget Visual Cafe

Roaster, CodeWarrior, and Cafe will run on 680X0-based Macs, as well as PowerPC Macs. Visual Cafe is a PowerPC-only application. All of the VMs without JITs will work on 68K Macs. CodeWarrior's JIT is currently PowerPC-only. Although Roaster's JIT allegedly supports 68K Macs, it is still beta, and may never make it to final release if Roaster Technologies decides to pull out of the VM game and work strictly through MRJ.

Conclusions

The simple and inescapable truth is that Mac-hosted Java development is still playing a game of catch-up. JDK 1.1 has been available on the PC platform for more than six months, and there is still no final JDK 1.1 VM on the Mac. By the time MRJ 2.0 brings this support to the Mac platform, we can expect developers on other platforms to be taking their first looks at JDK 1.2.

It's important to realize, however, that the Java technology lag on the Mac platform is not the fault of the IDE vendors, nor is it the case that there are no Java tools available for the Mac. Roaster and CodeWarrior in particular are true high-quality IDEs. Nothing available on the PC or Unix platforms compares to either of these in terms of ease of use. The problem on the Mac platform is simply a lack of a 1.1-compliant JVM.

So why develop on a Mac? Ask my office mates. The developers in my company all use PCs, running either Linux, Windows NT, or Windows 95. Our main development machine and file server is an UltraSPARC running Solaris. We do Java development, so not only is this kind of a cross-platform environment possible, but it helps us to test our code on as many different VMs as we can. Recently, after over a year of nudging, I finally convinced my boss to put a Mac at my desk. Before the machine showed up, some of my office mates couldn't understand my desire for a Mac. The other day, we did a code walk-through, and they were amazed at how far the Mac user interface goes toward speeding the process of navigating through code.

Of all the IDEs, I believe this ideal is best exemplified by Roaster. A code walk-through with Roaster feels more like a "dance-through." I'd recommend Roaster as my first choice tool for professional Java-only development.

On the other hand, Roaster is a much less powerful tool than CodeWarrior, which supports full-scale, multi-language, multi-platform development. You can also build native Mac applications (among other things) with CodeWarrior, which is beyond Roaster's capabilities. Because CodeWarrior is a C/C++ IDE as well, it's better suited than any of the other IDEs for work with native methods. CodeWarrior also has an excellent interface, though more complex than Roaster's, and somewhat cluttered with material that's irrelevant to Java. I'd recommend CodeWarrior if you're doing serious Mac development, and need support for native methods. (Then again, if you're doing serious Mac development, you probably already use CodeWarrior, and my advice is to renew your subscription.)

If you're just learning, it's really hard to beat Discover Programming for Macintosh in terms of sheer bang for the buck. At 9, it's the least expensive of all the IDEs, and includes support for C, C++, and Object Pascal. Everyone I tell about this product says the same thing I did: "I wish I had that when I was learning!" The only limitation is that you can't use it to develop commercial software. When you graduate to professional software development, you can upgrade to CodeWarrior Pro for 49.

Symantec does not seem to be putting a great deal of effort into supporting and maintaining Cafe for the Mac. Other than bug fixes, it hasn't changed at all in a year's time, and the documentation hasn't been adequately kept up to date. Visual Cafe seems to have more of Symantec's attention right now, and is a product to keep your eye on, but because of its current stability problems, I don't recommend rushing out to buy it.

Dave Makoweris a Web consultant and Java developer for Pencom Web Works (PWW), a business unit of Pencom Systems, Inc., headquartered in New York City. Dave is a co-author of Java Programming Basics, and has been a member of PWW's internal R&D team for the past year, designing and implementing a server-side Web application framework called MetaMagicTM.

Learn more about this topic

Join the discussion
Be the first to comment on this article. Our Commenting Policies
See more