Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

PersonalJava targets non-desktop computers

Expert offers key tips to help make your PC-savvy applets scale to consumer devices

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
If you're interested in designing Java applets for a variety of computer devices -- not just desktops, but handheld gadgets, Web-enabled televisions and telephones, and specialized devices for vertical industries -- you've probably realized that it takes a lot more to conform to the "Write Once, Run Anywhere" philosophy than just writing 100% pure Java code and dealing with the numerous idiosyncrasies the popular Java virtual machines found on desktop operating systems and within popular Web browsers. It's a tricky task, but you must plan ahead for all the devices that will be running your Java applets, now and in the future, and design an applet that is simultaneously intuitive, clear, and efficient on all of them. At the March 1998 JavaOne Java Developer Conference, Sun Microsystems staff engineer Herb Jellinek provided an overview and extensive outline of helpful tips and techniques for designing scalable applets that run effectively on consumer devices and desktop computers alike.

First, it's probably best to know what to avoid when designing your applet. As a general rule, developers should "eschew complexity," Jellinek says. For instance, applets with a lot of windows are a no-no; this includes frames and dialogs -- both modal and non-modal. Also, avoid nested and cascaded menus. Although you personally may prefer a nested-menu interface, your code should be driven by the preferences of the intended users, many of whom may find nested menus confusing and irritating. If you need to represent a hierarchy of selections, do it one panel at a time. What about cursors and scrollbars? Although using a cursor to indicate status is a clever hack, not all devices have them -- and even if they do, they might not be writeable. Scrollbars should scroll only vertically. Users are used to scrolling up and down (within Web pages, word-processed documents, e-mail messages, etc.); horizontal scrolling seems counterintuitive (and often tedious) to most people.

Now that you know the top "don'ts" as described by Jellinek, consider a few things he recommends you should do when designing scalable applets. Implementing single-level menus and walking a user through a process one panel at a time works better than relying on nested menus. If this seems too onerous, remember the last time you followed the straightforward instructions of a step-by-step wizard. Showing status graphically is preferable to using a cursor, and ScrollPanes (part of JDK 1.0) doesn't require an input mechanism.

The PersonalJava platform lends itself well to conforming to these basic dos and don'ts. As a Java Application Environment optimized for Java-enabled devices, PersonalJava is designed specifically for resource-limited environments and upward-compatibility to standard Java.

Jellinek advises developers of PersonalJava applets to carefully consider the design issues surrounding input and output devices. Beyond computer mice, useful input devices include joysticks, touchscreens, virtual keyboards, arrow or cursor keys, single buttons and levers, and speech recognition -- a welcome option for those suffering from carpal tunnel syndrome. Such unconventional input devices require special considerations; for instance, it would be extremely inefficient to require users to double-click choices on a touchscreen, and impossible to freely drag and resize a boxed area with an arrow or cursor that moves in only one dimension.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources
  • Sun's PersonalJava page http://java.sun.com/products/personaljava/
  • Sun's About PersonalJava page http://java.sun.com/products/personaljava/#welcome
  • Patrick Chan's JavaOne '96 presentation, "Developing Real World Applets," discusses in-depth technical strategies of creating real-world applets versus applications. (Adobe Acrobat/pdf document) http://java.sun.com/javaone/javaone96/pres/RealWorl.pdf