Three years ago, when we first tested a two-way pager, we didn’t notice its squinty display and cramped keyboard. Instead, we saw a tiny, battery-powered, programmable system with a built-in wireless modem. The potential for custom client/server applications seemed enormous despite the device’s miniscule memory and low data transfer rate.
The Research In Motion Ltd. BlackBerry 5810 builds considerably on the capabilities of early two-way wireless messaging devices. The 5810 boasts lots of technical advantages over pagers and RIM’s other products, and as a programmable device, it distinguishes itself primarily by running Java. RIM encourages custom development for the 5810 by offering its JDE (Java development environment), including a respectable Java editor/debugger and an accurate hardware simulator, free for download from http://www.blackberry.net.
The combination of RIM’s JDE with the 5810’s Internet connectivity creates possibilities that can’t be matched by notebooks or cell phones. The full keyboard, large (for a handheld) display, and mobile-tuned Java class libraries enable not only messaging but also sales automation, delivery tracking, database retrieval, and a host of other applications.
What’s inside
As are RIM’s previous handhelds, the 5810 is primarily a wireless e-mail client. This latest unit doubles as a cellular phone-on the AT&T Wireless and VoiceStream GSM (Global System for Mobile communications) networks-and the 5810’s modem uses the AT&T-VoiceStream GPRS (General Packet Radio Service). GPRS simulates a constant network connection with typical data transfer speeds in the low dial-up range (approximately 19Kbps).
The system runs on a 32-bit processor, backed by 8MB of flash memory and 1MB of battery-powered RAM. RIM employs a modified JVM (Java virtual machine) that’s optimized for its environment. It doesn’t run Java bytecode directly, making RIM’s specialized Java IDE (integrated development environment) necessary. RIM’s Java SDK (software developer’s kit) also includes command-line tools for converting Java classes to 5810-compatible binary files and for downloading applications to the device. RIM’s Java IDE takes care of the conversion and download automatically.
Within the lines
Java programs are by nature compact, but most Java programmers aren’t used to working in the tight quarters imposed by an embedded system. RIM’s documentation does an excellent job of describing common Java programming inefficiencies, such as leaving unused resources lying around-some garbage is never collected-and using 64-bit integers when 32-bit integers would do.
Perhaps the biggest shock in moving from a full JVM to RIM’s embedded environment is the 5810’s limited user interface. Developers spoiled by the colourful, pixel-hungry Swing GUI will feel lost: no pointing device, one-bit graphics, and a strange assortment of interface components. On the plus side, the foreground application gets complete control of the 5810’s QWERTY keyboard and trackwheel. A text-intensive application, such as a mortgage or insurance claim questionnaire, is workable on the 5810 whereas it would be close to impossible on a Palm, Pocket PC, or keyboardless smart phone.
The RIM JDE is unremarkable in some ways but laudable in others. The requisite syntax-aware text editor and project tree view are present. RIM’s “power coder” enhancements include performance profiling, code coverage reports (for verifying the thoroughness of tests), and a convincing 5810 hardware simulator. The simulator launches automatically whenever a program is run in debug mode. A radio control panel subjects the simulator to mocked-up radio service outages and weak signals. Although the GPRS modem in the 5810 is capable of near-constant connectivity, applications cannot behave as though they have a wired connection to the network.
Hitting the target
In practice, the JDE, simulator, and command-line tools fit the bill almost perfectly, especially considering they’re free. Aside from UI issues, the greatest limitation imposed by the 5810 is its size. You can’t squeeze 28MB worth of Java 1.3 run time into 8MB of flash memory. An awful lot of standard Java functionality was eliminated to cut the run time down to size.
The 5810’s Java library implements J2ME (Java 2 Micro Edition. A scant subset of the standard Java run-time classes is exposed through J2ME packages resident in the 5810. RIM obviously found the J2ME specification limiting because the largest and most useful packages (bearing the prefix “net.rim.device.api”) are those unique to the device. These extensions not only give the developer tighter control over the 5810’s hardware but also include extremely useful utility classes for such tasks as multithreading, GZip (Gnu Zip) compression, MIME decoding, and text-field validation. Network access to remote servers is facilitated by the J2ME HTTP classes. Developers can also use raw datagrams to exchange data with other machines.
Programming the 5810 takes some extra effort: RIM’s “Hello, world” sample is 170 lines long, including comments and stub methods for ignored events. We’d like to see better abstraction of common functions so that the simplest applications are easier to express and maintain. Functional applications that draw UI elements, respond to user-initiated events, and transfer data over the network can get big in terms of lines of code.
RIM’s samples and documentation lack detail in key areas. Large chunks of the API aren’t discussed in the programmer’s guide, so developers will need to plan for more experimentation than they may be accustomed to undertaking. Even with these caveats, RIM’s model for Java development on the BlackBerry 5810 is worthy of emulation: Create first-rate tools, make them available for free, and let the community unlock the potential of wireless applications.
THE BOTTOM LINE
BlackBerry Java SDK
Executive Summary: RIM’s latest wireless handheld, the BlackBerry 5810, runs Java and is programmable with free tools. The 5810’s upgraded network connectivity, QWERTY keyboard, and device-specific Java extensions enable a wide range of client/server applications.
Test Center Perspective: RIM’s free, high-quality programming tools greatly enhance the 5810’s value. Not only will we see rapid introduction of commercial applications targeting the 5810, but users will build a public library of useful software that’s free for the taking.