Turning the Big 1.0 - webOS App Development with PhoneGap | webOS Nation

Turning the Big 1.0 - webOS App Development with PhoneGap

by Tim Stiffler-Dean Sat, 13 Aug 2011 12:53 pm EDT

Ken Schreihofer is a Systems Developer from New Jersey, he writes about techniques for webOS and PhoneGap development at webOScapades. You can find him kicking around on Twitter at @digitalelph. We've asked Ken to come and share his experiences with webOS and PhoneGap here, so welcome him to PreCentral as he shares his expertise on the topic.

Last November, I happened to find myself sitting in Brian LeRoux's workshop at the HP Developer Day in NYC. His presentation on a platform called PhoneGap seemed to have quite a few people excited. I didn't have the slightest clue what that was, but I was fairly curious about the hubbub. Well, Brian's excellent presentation sated that curiosity, and gave me a hunger for more. That was my first introduction to the power and potential of the PhoneGap framework.

PhoneGap is described by the creators at Nitobi as “a cross platform native development framework that enables you to write phone applications for various mobile platforms using HTML, JavaScript and CSS.” While that's a bit of a mouthful, the role that PhoneGap plays is simple. It erases the traditional lines of mobile development. Instead of learning the native language for each platform, just write your app in HTML and JavaScript. You can port that app to iOS, Android, BB OS, WP7, Symbian, and webOS. In addition to the same code working on different platforms, your PhoneGap application can be deployed simultaneously to devices running webOS 1.x, 2.x, and 3.x. Imagine the possibilities.

A webOS developer might find it difficult to write an A+ app using only PhoneGap. On its own, PhoneGap is a barebones framework – it gives you access to various device APIs and a general structure for building an app. You could think of it like cooking a pie, with PhoneGap being the crust. Just like every delicious pie, it requires multiple ingredients, just the right mixture, and a little bit of love. There's no shortage of tools and libraries out there to help make your perfect app. Sencha Touch, jQueryMobile, jQueryTouch, and Jo are popular options for UI. iScroll 4 works well for inertial scrolling lists. JsOAuth for authentication. New JavaScript libraries pop up so often that you'd have to try hard to not find the right tools. (Tip: To find out about most of them, you can follow @dalmaer on Twitter)

There's been a good amount of discussion in the webOS developer community on the merits of various development paths. On one hand, you have the tried and true Mojo, which is currently deployed on all webOS phones. However, support for Mojo is diminishing and discouraged by HP. Enyo is the new hotness, but is currently limited to the TouchPad with an unclear rollout to current generation devices. There's a third option, and it's a strong contender: PhoneGap. The framework generally provides access to the full capabilities of webOS devices. Current APIs include the accelerometer, camera, gestures, geolocation, network, notifications, orientation and more. The main areas that fall short typically relate to Synergy, such as calendar and contacts integration.

PhoneGap isn't necessarily the right solution for every developer, but it could be for many. It's what finally gave me hope that I could write a webOS app. Personally, I've found it difficult to learn and work with Mojo and Enyo. I have a passing familiarity with JavaScript, and an advanced application in both of the frameworks requires advanced knowledge. PhoneGap just clicks for me at my current experience level. I see the light at the end of the tunnel – I might actually publish my app soon!

This post is being written in celebration of PhoneGap turning the big 1.0. While that version number typically describes unpolished software, it isn't the case here. PhoneGap is a mature and ever improving platform. You know, the allure of PhoneGap for a webOS developer is simple. It delivers on the promise made by Palm so long ago: you can write apps for webOS using only web techniques. There's no need to learn about scenes, assistants, kinds, or anything new at all. Just pure web methods. That lowers the barrier of entry for web developers, and that's just about what we need right now. So, a happy 1.0 to PhoneGap, and a hearty congratulations to the developers at Nitobi. Here's to a bright year of mobile apps!

Find out more at PhoneGap.com