|
Imagine that you're a major technology company, and you're trying to encourage software development for a new platform for hand-held computers, set-top boxes, and other consumer devices. But there's a catch--no such devices that use your technology are actually being sold yet. So how are you going to convince developers to spend their time creating applications for this platform, where memory is almost non-existent, screen displays come in all shapes and sizes, and the omnipresent keyboard and mouse might not exist? How? You offer them cash, of course! That's exactly what Sun Microsystems did last year when it held a contest for applications on its PersonalJava platform. Intended to: "Promote the creation of the most innovative and original applets and applications...written in the Java programming language and designed for the PersonalJava application environment," the PersonalJava contest ran from June to October, 1998. Lured by the $5,000 grand prize, with $1,000 going to each of five finalists, some 100 Java developers answered the call by submitting entries. "I was overwhelmed and gratified by the response, as it demonstrated the extent to which the PersonalJava APIs have been embraced by the developer community," said Herb Jellinek, one of three judges of the three contest judges. Jellinek is a senior staff engineer at Sun Microsystems and a founder of the PersonalJava project. "In particular, I was excited to see so many people apply our advice about usability and user-interface design to create professional-quality applications for consumer users." Joining Jellinek as judges were two other leading authorities on Java technology: James Gosling, the founder of the Java language, and a Sun Microsystems Vice President and Fellow; and Michael "Mac" McCarthy, President of Web Publishing Inc., whose publications include SunWorld, JavaWorld, and LinuxWorld. Like Jellinek, McCarthy was somewhat surprised at the turnout of applications for a platform that is still very much a work in progress. "To have so many entries in such a short time for such a new application platform is absolutely amazing," McCarthy said. "On the other hand, it was great to see that many contestants had used material from the more general Java market, which shows that PersonalJava builds on all the progress made so far by Java technology." In evaluating entries, the judges looked primarily for applications that not only adhered to the PersonalJava specification, but were ideal for the consumer devices where PersonalJava will be used. Jellinek estimated that 75% of the entries had been designed with considerations for the memory and display limitations of these types of devices. "When judging an application, I tried to place myself in the role of an untutored user trying to use it to solve a real-world problem," Jellinek said. "Depending on the application, I tried to imagine myself running it on a Java-enabled television set-top box, handheld computer, car stereo, or other appropriate personal-consumer electronics device. I favored programs that did not require any set up, documentation, command-line options, and especially those whose designers took to heart the notion that they were designing for ease of installation and use." The six winning entries selected by the judges are an interesting mix and include complete consumer applications, reusable components, and even a dose of the amazingly cool. The following sections offer a look at each of the six, and include insights from the developers who created them. Grand Prize Winner: JavaDraw The contest's grand prize winner was JavaDraw, a simple yet powerful drawing tool created by Vincent Zimmerman. JavaDraw boasts a very attractive and easy-to-use interface, and uses the same design and features of familiar commercial applications. After selecting a tool from the toolbar, you drag and drop objects in a drawing area. Each object can be selected, moved, and modified (position, colors, line weight, and so on), and you can group or ungroup multiple objects. Anyone who has used a popular drawing application will feel at home creating graphics with JavaDraw.
Click on image to enlarge. Instead of simply creating a drawing or graphic file, JavaDraw preserves your work by generating Java code that defines the contents of your drawing, which you can copy from the screen or email to yourself. This includes complete applet code that contains both init() and main() functions, so you can run it either as an application, or as an applet in an HTML page. When executed, the class faithfully paints your drawing on the applet panel. Like most of the winning entries, JavaDraw began life as a standard Java applet. Zimmerman began working on the project in early 1997 using Sun's JDK 1.02. Although the program's interface includes sophisticated GUI components, it's all homemade JDK 1.02. The program's image button, border panel, and color chooser components are all Zimmerman's own creations, and the interface uses GridBagLayout--all coded by hand, and no IDE involved--to arrange objects on the screen. "JavaDraw proves that it's possible to create a good GUI with AWT," Zimmerman said. "It's quite easy, but it requires experience." To make JavaDraw into a PersonalJava application, however, a few changes were needed. The most important of these modifications was the removal of the dialogs that displayed object properties and other information--these were replaced by panels displayed directly over the main drawing area. This change is almost imperceptible to the user, because these panels still behave like modal dialogs, but the change from a multiwindow to single-window GUI was a key change for supporting PersonalJava environments. "It was not too complicated for JavaDraw," Zimmerman said of the move to a single-window interface, "because I had a big center area that extended Canvas. I simply changed this class to extend Panel, and then placed other Panels in it, because it's now a Container. Then I modified all of my dialog Frame classes into Panels. When I needed to open a dialog frame, I simply put the Panel into the drawing area with Component.add()." Although one of the restrictions of PersonalJava devices is that they offer only small amounts of RAM, Zimmerman indicated that he didn't do anything special to JavaDraw to use less memory in the PersonalJava environment. "Not really," he said. "JavaDraw uses a sort of 'triple-buffering' to render the drawings smoothly and quickly. It consumes memory, but it was difficult to avoid without significantly reducing quality. I try to optimize the garbage collection in my code by putting explicit references to null, and limiting the size of Vectors." Considering its functionality, it's not surprising that JavaDraw is relatively large for a PersonalJava applet--25,000 lines of code with bytecode of about 400 kb. However, that didn't discourage the judges from declaring JavaDraw the best of show. "Alhough a bit on the large size, JavaDraw is impressively slick, usable, and useful," said Jellinek. "Far from being a toy, it's a professional-caliber drawing tool." Fellow judge McCarthy also cited JavaDraw's wide applicability as one of the reasons why the application was chosen as the grand prize winner. Zimmerman's advice to other Java developers, who may be considering making PersonalJava versions of their applications, was to avoid relying on optional PersoanlJava classes that may not be present on all devices. "I'd advise them to code in 100% Pure Java, and try to use only 'required' PersonalJava classes," he said. "The best solution is to maintain only one source code for applet, application, and PersonalJava version of the software. It's possible with Exception handling, final static boolean fields, and so on." For more information on JavaDraw, see the author's home page at: http://www.nctech.fr/Zimmermann Finalist: OuyaMail for PersonalJava Among the five contest finalists was OuyaMail for PersonalJava, a product of OuyaSoft Corporation. Like its parent product, OuyaMail for Personal Java is an email client, based on the JavaMail API that is, in the words of OuyaSoft, "a Customized Email Management System." Beyond typical email client functionality, OuyaMail allows users to dynamically add Java classes--known as "Mailets"--to process incoming and outgoing mail.
Click on image to enlarge. Like JavaDraw, OuyaMail for PersonalJava began as a standard Java applet and was modified to meet the PersonalJava 1.1 specification. However, as OuyaSoft developer Frank Kong indicated, this process was not a trivial one. "First, we got a File I/O problem," Kong said. "The PersonalJava's I/O package is quite restrictive, we had to get used to it, and try to make a lot of workarounds." Kong also experienced the problem of changing OuyaMail's multiwindow GUI to use a single window for all components; a process "that makes you crazy." He added that the OuyaMail developers took steps to ensure that the application would use as little memory as possible, a necessity for hand-held devices. "First, we tried to use light-weight components to make the code size smaller. In order to use less memory in the program, we thought about every place we could use fewer fields, and short fields." Their efforts allowed OuyaMail for PersonalJava to win the approval of contest judges, who also evaluated a number of other email-related entries. "Several developers submitted mail clients and servers," Jellinek said, "but OuyaMail won due to its simplicity of set-up and use, and because it takes good advantage of existing Java technologies: JavaMail and the Java Activation Framework." Although Kong indicated that working with PersonalJava was sometimes difficult, he recognized the excitement of developing applications for a new generation of consumer devices. "It is fun because you are closer to the low-level devices, and your work could be used by millions of people," Kong said. "It is also hard because there are not too many tools that help you debug the code." Finalist: WorldTime Bean In addition to complete applications, many of the PersonalJava contest entries were components that can be used in other applications. One such component is the WorldTime Bean, a Java bean created by Kim Ng that tracks information about cities throughout the world.
Click on image to enlarge. At the center of this component is a map of the Earth that shows the sunrise/sunset line around the world. Users can also see the current date and time at eight different cities of their choice displayed on eight clocks, and can get local information--including language, population, and currency--on more than 530 cities. As a Java bean, the WorldTime Bean is targeted at Java developers who want to integrate this functionality in their own applications. Like other contestants, Ng had to redesign the component's original interface--which included cascading dialogs--to fit the PersonalJava requirement of one window. Ng was able to address the variety of sizes of PersonalJava device displays, but the WorldTime Bean currently relies on color, which will not be available on all devices. "WorldTime Bean is able to resize and layout itself to be appropriate with the screen size," Ng said. "However the 'no color' constraint is not dealt with yet. This constraint will be dealt with when the actual implementation of PersonalJava on physical devices is available." Contest judges tabbed the WorldTime Bean as a finalist because of its usefulness to other Java developers. "This is a program I've been intending to write for a long time, and I'm happy that someone has done it for me," Jellinek said. "I do a lot of international travel, and the WorldTime Bean is a visually beautiful, robust solution to the question of, 'If it's 10:00 p.m. here in Tokyo, is my colleague in Munich still likely to be in the office?'" Ng's advice to other developers who are new to the PersonalJava environment is to concentrate on the basics. "There's quite a number of constraints in this environment," Ng said. "So just keep things simple and deliver what's important." Finalist: Reusable Interactive Map Another useful utility that made the the finalist list was Chunyen Liu's Reusable Interactive Map, a mapping application designed to be reused with the map data of your choice. The program creates a map by reading network map and data files, and its map interface includes: dual-blinking indicators for source and destination, case-insensitive substring search, dynamic coordinate and hot spot indicators, variable picture dimensions, fully customizable map-information file, and auto-centered locations.
Click on image to enlarge. Liu explained that it was not difficult to get Reusable Interactive Map to match the PersonalJava specification, but added that coding for PersonalJava was actually more difficult than writing standard Java code. "Generally speaking, it's a little bit harder because of limited system resources and consumer preferences," Liu said. "After I read the tutorial on consumer electronics, I almost gave up. It looked like some major JDK features would not be available." As with other contestants, Liu was mindful of the hardware restrictions of PersonalJava devices and paid special attention to the amount of memory and system resources his application consumed. Part of this was calling for immediate garbage collections whenever possible to free memory. "Working with PersonalJava really opens another view of my programming style," Liu said. "I have learned to pay more attention to managing memory and eliminating unnecessary operations. It also forces me to think what might interest consumers in terms of Java-enabled palm devices." McCarthy praised the usefulness of Reusable Interactive Map, and described it as "handsomely designed." Jellinek added that while it was "a simple application, the Interactive Map offers a new take on how personal navigation systems might work. I'm quite fond of its ability to show you images of the various points of interest in its database." For more information on the Reusable Interactive Map, see its home page at: http://members.xoom.com/javacliu/rim.html Finalist: Virtual Radio Although it is does not have the wide applicability of other finalists, Jens Ehrke's Virtual Radio nearly won the PersonalJava contest by simply being about the coolest thing the judges had ever seen. A simulation of a Blaupunkt New York RMD 127 car stereo, Virtual Radio offers a stunningly realistic interface that McCarthy accurately described as "absolutely gorgeous." Used on the Blaupunkt web site to demonstrate its products, Virtual Radio's almost photographic reproduction includes the face of the stereo, which is activated when you "insert" a key card into its blinking card slot. Once activated, you can click on the radio's controls to tune in to radio stations, listen to traffic reports, or even eject a CD. And yes, a CD actually pops out. The sound emitted by the application no doubt pales in comparison to the actual stereo, but otherwise, it's the real deal. "Its use of animation, sound, and touch-screen style input, along with its elegant bilingual German/English help, make it one of the coolest applications I've seen in a long time," Jellinek said of Virtual Radio. "Everyone I've shown it to has been impressed with its style and polish." Ehrke, like other contestants, expected to make significant changes to the existing applet to get it to work as a PersonalJava application. However, it turned out to be a little easier than expected. "The surprise was that the applet ran immediately on the PersonalJava platform," Ehrke said. Still, a lot of changes were made to the program for the PersonalJava contest: "We had to replace our third-party Java audio solution by the standard audio player, which is not optimized for low-bandwidth connection. We also had to remove the connection to browser plugins for the RealAudio option. We had to abandon an additional window for a remote control simulation, and we had to replace the XOR-mode drawings for negative display characters." Given that the application simulates a hand-operated device, it's no surprise that Virtual Radio operates well with the type of a touch-screen interface that will be used in many PersonalJava devices. "Our applet works very well with a touch-screen," Ehrke said. "There was a demo of the applet on SMAU98 with a touch-screen interface in Milan, Italy at the Sun Microsystems booth together with Alulabs, who demonstrated their WebSynth audio player there." To see Virtual Radio in action, go to the Blaupunkt web site at: http://www.blaupunkt.de/simulations/nydef_en.html Finalist: Mathematical Graph Another component recognized as a finalist was Mathematical Graph, created by Gunsik Choi. This application is designed for users who want to see the graph for the mathematical functions f(x,y). Users can also see the result of the function at any value (x,y).
Click on image to enlarge. Because it was created with standard Java 1.02, changing it to adhere to the PersonalJava spec was easy for Choi. The only change required was replacing a scroll bar in the original design with a button. McCarthy described Mathematical Graph as "sophisticated." Added Jellinek: "This is just the thing for the engineer on the go: a 3D graphing calculator that fits in your pocket!" When asked about advice for other potential PersonalJava developers, Choi downplayed the difference between PersonalJava and other platforms. "To tell the truth, I don't have much knowledge about PersonalJava," Choi explained. "I think it's more important to think about the idea--what do I make? What for?--than to think of how to implement it. That is the second problem, not the first problem." Back To Top | |||||||||||||
|
| ||||||||||||