Programming with PARTS for Java
By Joe Hughes
Many features touted in Java have always been available in Smalltalk. For example, Java achieves its multiplatform capability using a virtual machine; Smalltalk has been virtual-machine-based for many years. Recently, Sun announced it would join with consumer-electronics firms to put the Java virtual machine on a chip; Smalltalk coders did that at Textronix in the '80s. Smalltalk, wrongly seen as bloated, actually ran oscilloscopes. Come to think of it, the Smalltalk virtual machine could have been included in the Netscape browser instead of Java's.
Syntax aside, there are many similarities between the two languages. In fact, many guiding principles of Java, knowingly or unknowingly, mirror those of Smalltalk. Fortunately for Smalltalk developers, Parcplace-Digitalk has taken advantage of these similarities by creating
PARTS for Java (P4J), a PARTS tool that generates Java code. This article looks at P4J and shows how you can add Java to existing Smalltalk applications. To give you a taste of P4J development, I'll present a small applet that takes a URL and retrieves the HTML for that Web page.
What You Get
PARTS for Java requires either Windows NT or Windows 95, 16 MB of RAM, and another 16 MB of free space on your hard disk. The product also requires a CD drive, because P4J is provided only on CD-ROM (although downloads are available from the ParcPlace-Digitalk Web site at
|