This week Apache Cordova (formerly known as PhoneGap) graduated from the Apache incubator and is now a top level Apache project. Cordova got its start as PhoneGap at a company called Nitobi. Adobe acquired Nitobi in 2011 and donated PhoneGap to the Apache Software Foundation which placed in incubator status. Adobe continues to develop PhoneGap as a release of Cordova but indicates that it may acquire some proprietary features.
The Cordova API allows developers to take applications built in HTML5, CSS3 and JavaScript and deploy them natively on a number of mobile platforms. Cordova sits as an abstraction layer on top of the device OS so that by using a different version of Cordova, the same app can run on Blackberry, iOS, Android, Windows Mobile and a host of other mobile platforms. Cordova includes a rendering engine for HTML and CSS as well as a JavaScript runtime. So Cordova applications run ‘natively’ and do not require a web browser.
I first encountered Cordova while working on an Android application for a defense contractor. The application was map focused and allowed users to see where friendly forces (and others if known) were on the battlefield. The application was built natively in Android using Java (Dalvik). A number of potential customers expressed an interest in the application but wanted it on different platforms like iOS or on a desktop browser.We were struggling with the potential of having to rewrite the application for multiple platforms including some proprietary hardware/software used in our industry.
After attending FOSSGEO in Denver, I decided to try a web-based solution using HTML5, CSS3, JavaScript and Sencha’s extJS JavaScript library. At the time, I built the application targeted to the browser. In doing some research I stumbled upon PhoneGap in a matter of hours I was able to demonstrate our application running on Android, iOS and in a desktop browser. As a strategy we were considering porting PhoneGap ourselves to our proprietary platforms and using it as the framework upon which to build a variety of cross platform apps.
In addition to packaging the web functionality, Cordova exposes many native device features including sensors, the file system and contacts. Since Cordova runs as a native app on the device, Cordova-based apps have been accepted in Apple’s iTunes app store. Here is a sampling of Cordova/PhoneGap based apps currently in production:
- Wikipedia — Wikipedia Mobile
- Facebook — Mobile SDK
- SalesForce.com — Mobile Development SDK
- IBM — Worklight Platform for Mobile
- Microsoft — Halo Waypoint
As a mobile developer I think Cordova (I still have trouble not calling it PhoneGap) is a credible cross platform solution that can help organizations manage the growing array of mobile platforms in use by their customers and employees.