Overview
PhoneGap is one of several alternative approaches to smart phone development. Originally developed by Nitobi, it is now becoming an Apache open source project, following Nitobi's acquisition by Adobe. It was originally going to be renamed Apache Callback, but may instead become Apache Cordova. Like most people, we'll use the PhoneGap name for now.
Some nice features, particularly for this course, are:
- You work with HTML, CSS and Javascript, i.e., languages of use in the web world, rather than Objective-C or Java.
- But your apps work like apps, not like web pages.
- Your apps have access to the phone's features like the camera, the accelerometer, and so on.
- Much of your PhoneGap code will work across multiple platforms.
- There are a lot of tutorials out there.
- PhoneGap apps are allowed on the Apple store.
There's a number of fun videos on PhoneGap to check out:
- Demo and history of PhoneGap by the creators
- Converting a web page into a phone app by Jonathan Stark. Note that the web page was built for this purpose, using jqTouch, a library of CSS and Javascript designed to make phone-like interfaces.
PhoneGap setup
PhoneGap is pretty easy to set up but it involves installing a separate, large, development package for the phone system you're working with, e.g., Android or iPhone/iOS. Follow the instructions below. Be sure to test out all the examples given at the PhoneGap site.
The other possible option is to use the cloud:
- The appMobi PhoneGap XDK -- haven't used it myself but looks like a nice integration of various tools without requiring installing local SDK's.
For iPhone/iOS or Blackberry, you still need to pay to be a developer, whether you install an SDK or not.
PhoneGap testing
Here are some links to possible tools to use for testing PhoneGap apps. The links may be about PhoneGap testing specifically, Javascript testing, Android testing, iPhone testing, etc.
Every time you find a worthwhile page, post it on the Q&A site and I'll add it here. Even better, write a page with some solution you've come up with!
- Ripple:
a Google Chrome extension that emulates the
PhoneGap API; tags: #PhoneGap, #cross-platform
- A short video showing Ripple in use for geolocation example
- Less Painful: If you have a testing framework, you can run your tests on real phones via this free (for limited usage) web service.
Near Misses
- Robotium: an automated testing tool for Android, but according to this it does not support web view components, which is what PhoneGap uses.
Discussions
These are pages where people talk about possible solutions for testing phone apps, especially with PhoneGap. Many of the links above came from these pages. It's worth seeing the discussions and checking back on them once in a while to see if anything new has been added.
- PhoneGap discussion group, Jan 17, 2011
- InfoQ discussion on Android testing options.
- StackOverflow discussion on iPhone testing options
- TestFlight to distribute beta iPhone apps
- StackOverflow discussion on how to distribute a beta iPhone app
- a long list of tips for faster PhoneGap apps
- The appMobi PhoneGap XDK -- haven't used it myself but looks like a nice integration of various tools
- PhoneGap Google group -- very busy; on the one hand, it's encouraging to see so much usage, on the other hand, there certainly are a lot of gotcha's
- Simon MacDonald's PhoneGap blog -- Simon is one of the most prolific and helpful posters on the PhoneGap group
- iPhone Dev Log's list of PhoneGap links