PhoneGap – A Device Independent Platform

With Apple’s iOS and Google’s Android mobile OSes dominating the current mobile market right now, it would make perfect sense for a company to develop mobile apps for these 2 major mobile OSes.  However, to develop a native mobile app for iOS and another native mobile app for Android, this would incur two tracks of development. This is because the programming languages (in Objective C for iOS and Java for Android) and their IDEs/tools are different and require developers of different expertises.

Enter PhoneGap (, the HTML5 platform to create a single codebase to deploy to iOS, Android and various mobile platforms. It uses HTML5, Javascript (JS) and CSS familar to many web developers and its JS library can access the device’s native capabilities such as the phone contacts, camera/album and internal data storage. Essentially, a PhoneGap app is a native app that presents a ‘webview’ or an embedded browser that takes up the whole screen. It loads an index.html which is your HTML5 app. From this HTML5 app, you will be coding your UI and logic in JS/jQuery and use AJAX calls to retrieve data. This is the alternative to coding a mobile app using Web technologies. You can choose to embed jQuery UI frameworks such as or to simulate finger-friendly UIs for touch and CSS3 features for Webkit animations.

To keep my post short, there is a good comparison on the pros and codes of native vs. web technologies here: and many other comparisons that you can find on the Internet. But you will appreciate the differences and trade-offs if you have done both native and PhoneGap development before.

In summary, with PhoneGap, there will be a consistent UI that looks the same on both iOS and Android platforms and there is one main HTML5 codebase to maintain. I will not touch on how to start off coding a PhoneGap app as these are covered on the official site and there are many articles on how to use jQuery UIs with PhoneGap as well.

Things are not that rosy with PhoneGap, as there are still differences and tweaks required on each platform to get PhoneGap working the way you want it to…

Tagged ,

A Journal and a Journey

Apps development – whether for mobile or desktop or enterprise apps – is a journey in itself. Codes and SDKs are constantly changing and evolving and to ‘marry’ them together to form an usable app is a meteorological challenge. Apps developers are the guys who experiment constantly to get real software to work, they get their hands dirty – grease, nuts and bolts – to bring their creations to life. Anyone could have all the documentation and theory in the world but once you start to integrate codes and frameworks, their tiny and often undocumented differences can cause the best framework to break and nothing works at all.

This little journal will show you the way to some hair-pulling experiences in the mobile development journey. It’s the stuff that works after some hours of scouring the universe of the Internet for specific solutions. For a start, my journey begins with PhoneGap ( – a HTML5 platform that can be deployed to many different mobile platforms and run native functions. Is it truly platform-independent and near-native in user experience? Well, not quite… be prepared to drop some expectations, so read on for some of the challenges I have faced in the development of a PhoneGap app for the iOS and Android platforms.