by Daniel H. Steinberg

Update on Java development on and for the Mac

news
Feb 1, 199913 mins

Here's the news about the 'IDEs of Mac' from Metrowerks and Symantec. Plus: products demoed at Macworld Expo that make significant use of Java

Since Steve Jobs returned to Apple, the company has tried to reconnect with its former core customer base: the education market. This was the target in Jobs’s keynote demonstration of the Mac OS X Server software (see “Mac Java news delivered from the mothership at San Francisco’s Macworld Expo”). Jobs envisioned a classroom teacher running 50 iMacs off of a single G3 using this server software. Clearly, this is an appeal to K-12 teachers and administrators. Apple’s pitch to higher education prominently features Java. You can see this in the online or hard-copy version of its new publication, Apple University Arts.

The resurgence of the Mac platform brings with it a need for new, better, and more software that runs on a Mac. This article will focus on the following examples: With Metrowerks’s CodeWarrior and Symantec’s Visual Café, developers have their choice of tools to develop Java programs on the Mac; Zero G’s InstallAnywhere won the Utility category in the 1998 JavaWorld Editors’ Choice Awards. It allows easy deployment of Java applications to many different platforms. FileMaker Pro is the most popular database product for the Mac. It also runs on Windows, and now this cross-platform product allows Java developers to access databases locally or over the Web. FileMaker Pro is being used as the engine for the Education Object Economy (EOE), an online community that features on its site a large collection of Java applets in a wide variety of categories. EOE and FileMaker Pro are both Apple spinoffs. Stagecast Creator and AgentSheets, both spinoffs of the same (now abandoned) project at Apple, allow students to create simulations that run in Java.

Apple reaches out to higher education with a new publication

At Jobs’s August ’97 Macworld Expo keynote, his first after returning to Apple, he said Apple would focus on its traditional strengths: education and desktop publishing. Apple has released the first edition of Apple University Arts: News for the Academic Community, which is available online (see Resources), as a downloadable pdf file, or as a hard copy. It features Java from head to toe.

Apple University Arts is an eight-page, newspaper-sized magazine. The first issue profiles Java applets from California State University’s Biology Labs On-Line and includes links to three of the applets: EvolveIT! allows you to set the parameters of two bird populations on nearby islands and then watch the populations evolve; FlyLab! lets you design matings between fruit flies carrying genetic mutations and then observe the results; and TranslateIT! lets you synthesize new proteins from RNA sequences you create. There is also a feature article about Cornell’s online timecard system — a real-world Java application.

The publication’s Q & A column answers nothing but Java questions, and its editorial stresses the advantages of Java in addressing the needs of the education community. Val Greenlaw, Apple’s director of higher education marketing, writes that “Java is transforming the Internet into a dynamic, real-time environment for teaching and learning, and is enabling the deployment of mission-critical enterprise applications.”

Education Object Economy

The column includes a reference to one of Apple’s best-kept secrets: the Education Object Economy (EOE). This project was started at Apple and is now part of a nonprofit venture. The EOE has more than 2,000 applets listed by academic discipline. About half of them also include source code. EOE is more than just an applet repository. It’s an online community with contributors exchanging ideas on the applets, education, and other topics. JCampus is another example of the more generic Global Object Economy (GOE). Software for adapting FileMaker Pro to set up your own GOE is well documented and freely available at the Web site (see Resources).

The IDEs of Mac

JavaWorld author Dave Makower wrote two reviews — one in the fall of ’96 and one in the fall of ’97 — comparing the different IDEs available for the Mac (see “Four Mac-based IDEs compared: Which should you choose?” and “March of the Mac IDEs”). In the fall of ’98, it seemed as if there was nothing to compare. Symantec responded to rumors that it had abandoned continued development of Visual Café for the Mac platform saying that it had merged the teams working on the Mac and Windows versions and that it was doing a lot of its development in Java. There have, however, been subsequent Windows versions of Visual Café — without corresponding Mac releases.

Metrowerks’s CodeWarrior

Metrowerks seems to have rethought its Java strategy. The company’s model had been to provide multilanguage tools (Java, C, C++, and Pascal) for multiple targets in one product. Its toolset already supports the Mac OS, Windows, and Solaris, and by the end of the year is scheduled to support Linux on the PowerPC and x86. It has licensed its JIT into the Linux world to improve Java performance before its tools are deployed.

Metrowerks has released a Java-only version of CodeWarrior, called CodeWarrior Professional for Java. Greg Galanos, Metrowerks’s president and CTO, explains this change in the company’s model: “The performance characteristics of Java have increased across the board so there is a swing toward using Java, and Java only, for cross-platform development.” The Java-specific product is clearly designed to compete with Visual Café, and although it won’t initially have RAD tools, these should be available in late spring. “RAD architecture is the most significant change in CodeWarrior Pro 5,” said Galanos. “Our objective is multitarget: You can use the RAD tools with MFC on Windows, with PowerPlant on the Mac, with JavaBeans and with Pipeline, our new embedded framework.”

The RAD architecture is part of the core IDE architecture and provides a new design layer to the IDE that is either present or not, depending on whether you’re using RAD to design your application and generate the source code. Developers will have to wait until the second release for object wiring.

Galanos says the academic market is a good example of why the product should be so successful. Many schools are set up with both Mac and Windows machines. CodeWarrior serves both markets and allows developers to port project files back and forth across the different operating systems. The Solaris-hosted tools provides the academic infrastructure based on Unix workstations with the same IDE students are using on their computers. The Metrowerks model is to provide one toolchain across different platforms. Its strength, according to Galanos is that it “eliminates the tools’ obstacles by having a core that is platform-independent and a UI [user interface] that is platform-dependent.” Galanos sums up Metrowerks future Java offering as providing “RAD tools anywhere — for hard-core developers.”

Symantec’s Visual Café

For Symantec, this competition from Metrowerks on the Mac platform may feel like deja vu. Symantec was the dominant tools provider for Mac developers working in C and C++. Metrowerks entered the market five years ago and Symantec abandoned its efforts. When it comes to Java on the Mac, Symantec was an early entrant with Visual Café. It provided RAD tools and JavaBean support on both Mac and Windows IDEs. Early last year, the Mac developers community got word that Symantec had abandoned the Mac platform. Since that time the Windows versions of Visual Cafe have been upgraded with no similar improvements made to the Mac versions.

“Visual Café supports the latest Java technology and JavaBeans on the Mac,” says Allen Bannon, director of developer relations for Symantec’s Internet Tools Group. He notes that “much of the improvements in performance of the Macintosh Runtime for Java (MRJ) come from last summer’s licensing of Symantec’s just-in-time technology.” Symantec is excited about the Mac, believing that a healthy Apple is good for the industry, according to Bannon.

Bannon points out that the first Metrowerks Java release will not have RAD tools. “Visual Café was the first with RAD tools on the Mac. We provide the needed tools right now.” But Symantec cannot continue to rely on an IDE that it isn’t upgrading for Mac users. More importantly, Symantec must understand that the current battle with Metrowerks isn’t just about providing tools for the Mac. Once Metrowerks has the RAD tools on an IDE that supports the Mac OS, Windows, Solaris, and Linux, it may be in a position to dominate on more than just the Mac platform.

Jikes comes to the Mac

The Mac port of the IBM research project Jikes is now available. MacJikes compiles Java source to bytecode, but unlike javac, MacJikes is written in C++. Despite the obvious speed advantages, MacJikes isn’t an IDE. In fact, it currently has only a command-line interface, but developer Steve Bytner promises a GUI will be released soon. According to Bytner “the next version [of MacJikes] will be made as a shared library and it will be even easier to integrate it into people’s development environments — whether it be MRJ or MPW [Macintosh Programmer’s Workshop]. Eventually CodeWarrior support will be available.”

Development on Jikes started at IBM Research in January ’96 and was first released in April ’97. A little over a year later a Linux version of Jikes was released. User response and comments encouraged IBM to release the source at the end of ’98. The company hopes to benefit and learn from participating in an open source project. The Jikes home page reads: “Other open source agreements from IBM … are likely to be more restrictive with respect to commercial use — we are allowing almost any use for Jikes because we believe it benefits the Java community and doesn’t give away any intellectual property.”

Zero G’s answer to ‘Write once, run anywhere’

Java increasingly is being used by hobbyists and first-time developers. One of the least understood promises of Java is “write once, run anywhere” (WORA): Mac users may wonder why 100 percent pure Java applications don’t automatically run on a Mac. Eric Shapiro, Zero G’s president, describes his company’s solution to this problem: “InstallAnywhere is a solution to the biggest deployment and execution problem. It allows you to easily build installers to deploy a Java application on Windows, Mac, Solaris, Unix, and other platforms while taking care of the platform-specific details. Before Zero G, you needed a separate installer for each platform.” InstallAnywhere won the 1998 JavaWorld Editors’ Choice award in the Utility category.

Apple doesn’t seem to understand the importance of InstallAnywhere to its own cause. Apple’s answer to the problem of WORA on the Mac has been to provide developers with a long list of confusing steps to follow. There just wasn’t much incentive for developers to learn how to perform these Mac-specific operations. It should be important to Apple that its customers are able to run a wide variety of existing Java applications. Apple has made it more attractive for developers on other platforms to provide a Mac port, but it hasn’t make the process any easier. InstallAnywhere makes porting to or from the Mac or any other Java platform very easy.

InstallAnywhere is written in Java, so this utility is available for Mac developers who want to deploy on the Mac or other platforms (with support available for 29 different languages). A basic version called InstallAnywhere Now! is bundled with the Java development environments for Mac developers: Symantec’s Visual Café, Metrowerks’s CodeWarrior, and the Macintosh Runtime for Java Software Development Kit.

Java and Mac software notes from the Macworld Expo show floor

At Macworld Expo, it’s still difficult to find Java being used in real ways in the products being demonstrated. Here’s a quick look at three notable exceptions.

FileMaker Pro 4.0, 4.1

The FileMaker Pro 4.0 Developer Edition (FMPro) included support for Java. This was a natural step, since FileMaker Pro is the top database choice on the Mac and the second best-selling database software for Windows. Users could choose FMPro’s Instant or Custom Web Publishing options, but Instant Web Publishing is very limited, and Custom Web Publishing requires the user to learn the proprietary Claris Dynamic Markup Language.

With the Java APIs shipped with the Developer Edition, Java programmers can search, write to, and read from an FMPro database running on a server. For workgroups in business or classrooms in education, this enables easy sharing of information. Although there are problems of scaling up, this is an inexpensive and flexible solution for modest sized groups. FMPro 4.1 has added the ability to import data from ODBC/SQL-compliant databases. As FileMaker continues to evolve in this direction, these Java hooks into the database become more attractive.

Simulations in education using Java

Many very cool ideas came out of Apple’s Advanced Technology Group. Alan Kay’s MacPal group spawned the Constructo and KidSim programming projects targeting kids as programmers. Jim Spohrer writes in his report titled “Authoring Tools and an Educational Object Economy”, “KidSim was [an] authoring tool for kids to create simulated worlds and interactive games … Once game pieces are defined, rules of interaction are defined, and an initial configuration of pieces is placed on the gameboard, a clock is started and the pieces begin moving and interacting.”

Alex Repenning’s Agentsheets programming environment derives from this and then uses his “Ristretto” program to create Java applets. Users can go to the Agentsheets Web site and share the “gamepieces” they and others have created. Although the development environment for users is a Mac-only product, once it becomes a Java applet it can be used on other platforms. The other descendent of KidSim was Stagecast Creator. KidSim was ported from Sk8 to Prograph where it was renamed (and freely distributed as) Cocoa. When Cocoa was cancelled, the Stagecast company was formed and Cocoa was reengineered in Java and called Creator. I encourage you to play with each of these programs. In a way, they are to object-oriented programming what Logo was to procedural programming.

Conclusion

Apple understands the importance of a solid commitment to Java on the Mac. The good news for developers who prefer to work on a Mac is that, although the choices are limited, the tools are there. Metrowerks’s future plans to include RAD tools with its Java IDE are promising. Symantec’s plans for Java support on the Mac aren’t yet clear. InstallAnywhere should make it easier to bring applications developed on Windows boxes to the Mac while helping Mac developers successfully deploy their programs to the larger community. Finally, in the past, companies thought they would boost sales simply by saying they were using Java. Now companies are beginning to look at real ways to use Java that take advantage of its strengths.

Daniel Steinberg is a visiting assistant professor of mathematics at Oberlin College. He learned to program in C (by reading Kernigan and Richie, and asking friends) and C++ on a Macintosh to help his research on elastic curves in hyperbolic space. Object-oriented design is the way in which mathematicians view the world and so programming in Java was an obvious next step. Daniel has taught an introductory course in Java and OOA/OOD. He thinks the first words spoken by his daughter Maggie Rose were “My Mac” and his wife thinks Maggie was saying “Mama.” Maggie knows she was asking clearly for an “iMac” and that she prefers tangerine.