With so many mobile devices in the market, more and more apps being developed. It kind of reminded me of the early day of the web when new browser came up one by one. In the mobile world, we have to deal with different devices and choose between web or native app. With HTML 5, our web app can do some of the things that a native app can. If you are familar with Sench Touch, the framework provides features such as touch event, geo location, offline storage and rich UI library. So, what are the things that may driver us to go native? at the top of the list is accessing the devices features & hardware (e.g. accelerometer, photo, contacts, vibration, etc). The 2nd driver could be $, meaning selling our apps in the App Store.
Let me introduce PhoneGap to bridge the gap. As you can see from the diagram, PhoneGap is an open source framework that act as a bridge between web apps and mobile devices. Brilliant, har!! The framework allows you to:
- package your web app code and resources into a binary app and deploy to multiple platforms (currently it supports 6 platforms; iOS, Android, Windows Phone 7 (coming soon), Blackberry, Palm/HP webOS and Symbian.
- access native features such as accelerometer, camera, compass, contacts, file, geo location, storage, meaid and notification. The features x devices/OS matrix is available here.
Interestingly, You can also compile your code in the cloud via build.phonegap.com. It is still in beta, so it is free. The pricing details will be announced near its launch date.
- For now, building graphic intensive apps may not be suitable. Coding in the device native language may be better. But with the advancement in HTML 5, things may change.
- The first stable release (v0.6.0) of PhoneGap was in Feb 2009 and now it is at version 0.9.4. Will there be big changes before it reaches 1.0?
- Using PhoneGap means you must keep up with the devices OS version & PhoneGap. Hopefully the release can be fast enough since it is supporting so many devices.
- For iOS, the framework integrate with XCode and it is very easy to jump start.
- The documentation is good. It is organised base on the features and each has example.
- API Documentation
- Getting Started iOS
- Getting Started Android
- Below is the PhoneGap presentation at Sencha Con 2010 and more presentations here.
I downloaded and started to play with the framework a little. I migrated my USGS app – which is based on Sencha Touch – to a native iPhone app. I have yet to explore its native APIs in depth. Just wanted to share the framework.