iPhone development tools that work the way you do

You don't need to master Cocoa and Objective C to create killer iPhone apps. Rhomobile, PhoneGap, Appcelerator, and Ansca tools leverage standard Web technologies and still tap native features

Page 5 of 8

The PhoneGap project does pass through some of the data that wouldn't normally be available in the iPhone 2.0 browser. The newest version of Safari has built-in connections to the geolocation data -- which PhoneGap included before it was available. PhoneGap also hooks into all of the major parts of the iPhone API, including SMS, contacts, raw files, the camera, and the accelerometer.

The project relies on the WebKit implementation for much of its cross-platform success. Both Android and the iPhone rely on the same open source toolkit to render HTML. The earlier versions of the BlackBerry don't use WebKit, so if you're targeting these BlackBerrys, you'll need to rewrite your JavaScript to handle cross-browser issues. It's probably easier to just limit your applications to BlackBerry OS 4.6.

The PhoneGap project knits together a good number of programmers with a wide range of talents. Most of the activity is devoted to the iPhone, although there's some focus on Android and the BlackBerry.

The biggest problem with using PhoneGap is the way that Apple will reject some but not all applications developed with it. (Check out my experience.) Many programmers feel that Apple rejects the PhoneGap code almost automatically, accusing PhoneGap apps of linking to some private APIs or somehow misusing UIWebView. Many theorize that Apple may just be trying to cripple cross-domain development. No one can be certain, but there is a long list of accepted iPhone applications that began with the PhoneGap starter project.

Appcelerator Titanium

If the idea of developing your application in HTML and JavaScript appeals to you, there's no reason to limit the fun to smartphones. The Titanium platform from Appcelerator comes in two flavors: the mobile version for handsets and a desktop version for Windows, Mac, and Linux. The two platforms aren't exactly the same, though, because the desktop version lets you write code in Python and Ruby, but the mobile version only accepts JavaScript.

Appcelerator also makes the claim that "~200 Lines of Code, 0 Objective-C" in its demonstration application somehow produces "1 Native iPhone app." This claim to produce iPhone-native apps may be a bit truer than with the others because the system is meant to be more than a mirror of Web development. While PhoneGap is designed for Web browser developers, Titanium includes a number of exclusive packages. You may be writing JavaScript, but much of what you're doing is stringing together objects from the Titanium namespace. The application I built with PhoneGap could run in most modern Web browsers, but the one I built with Titanium needed the Titanium libraries.

These libraries are much more extensive than those in the other frameworks. If you want to add any of the standard menus or window-swapping tools common on the iPhone, you need the features in the Titanium library. There are tools for creating windows, menus, and all of the common widgets. These routines behave like iPhone widgets should, too. When you open up a new window, the old one scrolls to the left and the Return button appears. It's quite professional and took me only seconds once I looked at the sample applications -- a ridiculous fraction of the time I've spent laboring to develop the same level of polish with HTML, CSS, and JavaScript before. (With Titanium, you'll rely heavily on the sample apps. The documentation is a bit simple and doesn't include much description of the parameters.)

titanium_sm.gif
Titanium lets you string together native iPhone components with JavaScript.
Related:
| 1 2 3 4 5 6 7 8 Page 5
From CIO: 8 Free Online Courses to Grow Your Tech Skills
Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.