Why not PhoneGap

PhoneGap: Mobile development made easy

James R. Borck

Developing mobile apps is not easy. This is especially true if you want to serve several smartphone platforms. PhoneGap will help you with this.

EnlargeWith PhoneGap you can develop apps for mobile devices
© Hans-Christian Dirscherl

The well-known developer tool PhoneGap has recently become an Apache Software Foundation Icubator project called Cordova. PhoneGap combines HTML, CSS and JavaScript with an API so that you can tap into the native device hardware and functions without using the programming language common for the respective mobile platform (e.g. Objective-C for iOS, Java for Android or .net for Windows Phone 7). PhoneGap gives web developers the ability to tap into the stored contacts and files as they would when developing with native code. You can also manipulate the local memory and use the camera and GPS sensors, for example. The direct exchange with the HTML-controlled mobile user interfaces is made easier with PhoneGap.

PhoneGap's greatest advantages

Best of all, however, a single PhoneGap app can be used for many different devices. It supports Android, iOS, Windows Phone 7, BlackBerry, Symbian, WebOS, and even Bada. However, this simplicity and cross-platform compatibility has to be paid for. Because the web apps created with PhoneGap appear native, but this expression is not really justified from a technical point of view.

For example, when you're building an Android app, PhoneGap packs your HTML, JavaScript, and CSS into a WebView container and relies on the underlying WebKit rendering engine to run. Thus the restrictions of the browser are inherited. As a result, PhoneGap is not the first choice for performance or graphics intensive applications.

However, if you want to make a data-heavy web app available to more mobile devices, PhoneGap can help. It offers an excellent balance between development effort and application functionality. You can use it to create powerful apps that use plug-ins to mimic the native user interface. The plug-ins can also be used to integrate additional functions such as push notifications or PayPal. The biggest advantage, however, is that programming with PhoneGap does not have the same demands as native programming. And: PhoneGap is available free of charge.

Notice the gap

Remember that PhoneGap SDK is a "bare" framework. You won't find any pre-built code widgets or the convenience of a user interface. Furthermore, PhoneGap does not offer any middleware for connecting the devices to back-end servers, as is the case with Rhomobile and its synchronization infrastructure.

You have to use a native tool chain to program your app. For Android, install Eclipse, the Android SDK, and the Android Development Tools (ADT) plug-in. You may also need to install Git if you want to reach certain platforms and optimize the app. If you want to run the app on an iOS, Windows Phone and BlackBerry, you can use Adobe's PhoneGap Build-Cloud to create packages for all of these and other supported platforms. PhoneGap Build is free for open source projects and starts at 9 euros per month for private applications.