PhoneGap Beginner’s Guide, by Andrew Lunny
Packt Publishing, https://www.packtpub.com/
I’m reading the PDF version of this book, which displayed very nicely on Adobe Reader.
This book covers a lot of material (emphasis on “a lot”). This review will cover the breadth of this book’s content. It starts you at the beginning, with downloading PhoneGap and the Software Development Kits (SDKs) you’ll need to create and install applications for each of the mobile phone frameworks (Xcode for iPhone, Eclipse for Android, and Blackberry Webworks). We are introduced immediately to Git, ant, and Ruby, so we can start using them in our workflow.
All that in the first three chapters. With humor. The chuckle train keeps on rolling as we integrate Twitter (retrieving those feeds containing our key words) and JSON to the app.
With the above foundation out of the way, the author tackles cross-platform headaches, introducing tools that help us to format our code for the different mobile phones. (You’ll want to actually follow the author along as he builds the apps, for you’ll modify those apps later on in the book.)
Next, we learn of XUI and HTML5’s video, audio, and canvas elements, CSS3 transforms, and iScroll. All this is well and good, but we want to learn about PhoneGap and it’s unique ability to access the physical phone’s capabilities. The book doesn’t disappoint: that’s next. The foregoing has given us good practices for programming for PhoneGap. The first half of the book’s blurb sums it up: “Build cross-platform mobile applications with the PhoneGap open source development framework.”
We learn how to query the device’s geolocation to get a user’s latitude and longitude (we build a postcard app and include this information with the postcard), and monitor the accelerator reading to detect device motion (shaking the device will undo the postcard).
Then we learn about using the camera, rendering the images right on our page, then finding and adding Contacts.
The author does not neglect PhoneGap plugins. We are treated to the ins and outs of getting the ChildBrowser plugin to work. (This plugin allows one to click on an external link in our app, then navigate back to our app, rather than exit the app to view the link on Safari.) We even get to write our first PhoneGap plugin!
Chapter 11 tells us about synching offline, caching online database data locally for offline usage. There, we’re introduced to Ruby and Sinatra to code web services.
I appreciated the helpful summaries of just what happened in that chapter. Those sections allow us to catch our breaths before taking the plunge in the next part. We also get pop quizzes, so we can test whether we’ve been paying attention (the answers are in the back of the book).
This book helped me to clean up my act by showing me a pro workflow. It also gave me confidence to experiment with integrating more of the PhoneGap iOS device functionality into my apps, which I have yet to do.
You’ll find the book at https://www.packtpub.com/, Amazon (http://www.amazon.com/PhoneGap-Beginners-Guide-Andrew-Lunny/dp/1849515360), and Safari Books Online (http://my.safaribooksonline.com/book/-/9781849515368)