Spazzing out with webOS app developer Ed Finkler

Palm's webOS platform has attracted considerable attention since the launch of …

Palm emerged in the 1990s as one of the innovative champions of mobile computing. The company practically defined the handheld computer form-factor and contributed many technical concepts and user interface paradigms that are still found in some of the most popular mobile devices. The Palm of today may be a mere shadow of its former glory, but the company could be poised for a surprising comeback.

Palm's newest creation, the Pre smartphone, has the potential to restore the once-mighty gadget maker's reputation as a leader in innovation. The device's unique operating system, called webOS, allows third-party developers to use Web technologies—such as HTML and JavaScript—to create native applications that can integrate tightly with the platform. This lowers the barriers to entry for software development and provides an elegant portability glide path for bringing Web applications and Adobe AIR programs to the Pre.

Although the concept seems promising, it is difficult to provide a deeper evaluation because Palm has not yet opened the toolkit to the general public. Only select third-party developers have official access to the SDK at this time (others have obtained it through a recent leak) and they are bound by nondisclosure agreements that prevent them from providing more specific details. This is largely because the SDK and App Catalog—Palm's third-party software store—are still incomplete and under heavy development.

To gain greater insight into the strengths of webOS and the platform's nascent SDK, we sought a first-hand perspective from independent software developer Ed Finkler, the creator of a popular open source Twitter client called Spaz. Finkler is one of the first third-party developers to build an application that is available to end users through Palm's App Catalog. Finkler described to us his effort to bring Spaz to the Pre and shared some of the things that he learned along the way.

"Anyone who has done some significant rich application work in either the browser or a Web runtime like AIR or Titanium should be fairly comfortable with webOS. I'd say that getting used to the way applications are structured in mobile is more of a challenge, with the separation of functionality into different scenes and passing data back and forth between them," he told us.

He says that Spaz on the Pre is not a direct port of the desktop version, however, and that a complete rewrite was necessary to make it work optimally on webOS. The entire process took him the equivalent of a month of full-time work, including the time that he invested to learn the APIs and familiarize himself with the platform.

"Getting the basics going wasn't very hard. The more difficult stuff was adapting the way I had been used to developing desktop apps in Web runtimes to the card model of webOS," he explained. "Doing a simple port that runs might have been a much shorter process, but making it use the native OS widgets and such meant learning how to harness that stuff. It probably could have [taken less time] if I wasn't committed to keeping a webOS-'native' look and feel."

The NDA is still in full force, so Finkler could only speak generally about the experience and was not able to discuss APIs and other related aspects of the SDK. On those topics, he currently prefers to let his code speak for itself. Palm has permitted him to publish the source code of his mobile Spaz program, which can be found on GitHub. There is much that prospective Pre programmers can learn from the code, and it provides those of us outside of the SDK community with a valuable glimpse into the specifics of webOS application development.

The Spaz HTML is heavy on nested div elements and has a few Palm-specific attributes peppered throughout. The popular open source jQuery library is used extensively to manipulate the user interface. These characteristics are a promising sign that the Pre development model is conducive to reusing existing JavaScript code and doesn't push Web developers too far off the beaten path.

Indeed, Finkler says that developers who are accustomed to popular JavaScript frameworks such as YUI or Dojo, will have little difficulty adapting to Palm's platform.

A message bus is used to expose underlying platform capabilities to third-party applications through JavaScript. This means that third-party webOS software has full access to hardware features like the GPS and camera, and it also has the ability to leverage software features like the addressbook and dialer. It's worth noting that Palm's own first-party applications, such as the calendar, are built with the same technology.

Finkler could not specifically discuss these aspects of the SDK or disclose the scope of platform features accessible to third-party developers, but he did confirm that the framework is robust enough to build applications that are comparable to Palm's own. It's evidently much more sophisticated than the Web widget system that Apple offered for the iPhone prior to the launch of the iPhone SDK. Third-party webOS applications are not mere Web widgets but full-fledged applications that are built with Web technologies.