Should You build Phonegap or Native?
Most start-ups and independent developers run into the same question:
Should I use PhoneGap or native to develop my app?
I chose PhoneGap and I’m happy with the results. PhoneGap used to be slow, but v3.0 , released mid 2013, is fast. On modern devices the performance is comparable to native. Final result, Heart Spark Android App it uses gps, maps, camera, storage. Note: You must include FastClick.js in your app, it removes the 300ms delay mobile browsers have built in.
*Exceptions* If you are building a game or anything animation heavy the answer is probably native. If you must support older, weaker devices do some testing before committing.
2 months ago I started work on Heart Spark, an app to gamify the crowdsourcing of defibrillator locations. After a month of trying native development and a month of PhoneGap development I stuck to PhoneGap and was very happy with my choice. Since then I’ve had to do three more app development projects, and both times I’ve gone to PhoneGap.
PhoneGap Features I Used
- Offline maps with Leaflet.js
- GPS tracking (both high and low accuracy)
- Native Camera
- File Storage
- AJAX / Web Communication
- Facebook Connect: (I had trouble getting the Android Release version to work.)
JS Frameworks & Libs Used
- jQuery Mobile: great for mobile friendly UI, but way too heavy; it inflates the DOM 3-4x. If redoing it I would choose Twitter Bootstrap.
- Leaflet.js Mapping Library. You can also use Google Maps, but Leaflet makes offline mapping easier.
- FastClick.js a polyfill for getting rid of the 300ms delay in mobile browsers.
Why Phonegap over Native?
Managing a single code base: If we went native we would have to manage two code bases, iOS and Android. That means every bug fix, every feature added, every change would have to be done twice.
Making it pretty: I spent a month building the native Android version while my partner built the iOS version. It was my first native Android app, so the learning curve was pretty stiff, but I’d done Blackberry and WindowsPhone development before, so it wasn’t too bad. The problem I had was that getting a nice looking UI was not as easy or natural as in PhoneGap. With PhoneGap I just had to find a nice style sheet, drop it in, and I was done!
Apps I developed with PhoneGap, try them out to test PhoneGap performance on your device.
Heart Spark: https://play.google.com/store/apps/details?id=com.smewebsites.heartspark
Hotdogs or Legs: https://play.google.com/store/apps/details?id=com.smewebsites.hotdogs
More PhoneGap Articles
How to setup a PhoneGap 3.4 App in 5 min
Phonegap 3.0 + Leaflet + Offline maps