PhoneGap - open source framework for mobile development with JavaScript.
March 24, 2009 by MK
Filed under Javascript, Online Media, Software Development, Tech News, web development
The creators of PhoneGap think it’s nonsense that developers have to write the same app in several different programming languages to reach the widest swath of mobile phone customers, so they developed an open source, cross-platorm framework that bridges the gaps among them.
“PhoneGap is an open source development tool for building fast, easy mobile apps with JavaScript. If you’re a web developer who wants to build mobile applications in HTML and JavaScript while still taking advantage of the core features in the iPhone, Android and Blackberry SDKs, PhoneGap is for you,” reads the Web site.
To get an idea of the types of mobile phone features PhoneGap supports currently (more are on the way), take a look at this quick reference chart the creators put together:
PhoneGap is the Adobe AIR of the IPhone, Blackberry, Android, Symbian and Windows Mobile. Just like Adobe AIR enables web developers to build Windows and OS X applications using the HTML and CSS skills that they know and love, PhoneGap allows web developers to build applications for the mobile devices with web technologies while taking advantage of the native mobile phone API’s.
Using PhoneGap, a developer need not write any Objective-C code and yet they can still have a proper app installed that is essentially a slightly customized PhoneGap application that sports a custom icon and a certain URL where application lives online (very much like AIR). When a user starts PhoneGap it essentially creates a browser on the mobile device and navigates to the specified URL where the author of the web page can access that particulars phone’s API through JavaScript like this:
getLocation();
//GAP will invoke this function once it has the location
function gotLocation(lat,lon){
$(’lat’).innerHTML = “latitude: ” + lat;
$(’lon’).innerHTML = “longitude: ” + lon;
}
Or access the accelerometer data like this:
function updateAccel(){
$('accel').innerHTML = "accel:"+accelX + " "+accelY+" "+accelZ;
setTimeout(updateAccel,100);
}
Seems like RIM needs some applications built on this API. And then all those RIM users might be able to run all the cool iPhone apps on there blackberries.
For a quick introduction to PhoneGap, watch this three-minute video:














