Tuesday, April 30, 2013

Review PhoneGap 2.x Mobile Application Development (e-book)

Packt asked me if I was interested in reading one of their books, PhoneGap 2.x Mobile Application Development Hotshot, and write my thoughts on it.

As the topic is in my interest sphere and I was having a long flight ahead, I decided to use that time to read it. So I read the book on my iPad in about 9 hours, but didn't try the code the comes with the book yet.

I strongly believe in developing mobile applications for both smartphones as tablets. You can either go the native route (iOS, Android, Windows phone, ...) or go the HTML5, CSS3, JavaScript route. I see a market for both, but I personally lean more towards the HTML5 way, as I can use the skills that I currently have. PhoneGap (built on Cordova) bridges the gap between what you can do standard in HTML5 and what you can do if you would code natively for the device. PhoneGap offers a JavaScript API to access the hardware of the device, for example the camera, microphone, accelerometer, filesystem etc.  PhoneGap wraps your HTML and JavaScript into a native shell, specific to the device, so you could even submit it to the platform's app store.

The book is mostly build of examples, which is a great way to see the potential of the tool. The author starts with giving a brief overview what PhoneGap is and where it fits in. It also walks you through how to prepare your environment to run the examples. Next it's all examples... The first chapter talks about how to create multilingual applications and sets the foundation for the other chapters. I found it interesting to see the author is using the YASMF framework (instead of for example JQuery Mobile).

In the second chapter you basically build a basic twitter application which also allows you to share the information. To do the sharing she used ShareKit, a very nice open source project.
In the following chapters she builds applications around the PhoneGap's File APIs, geolocation features together with Google Maps, recording and playing of audio, using the camera to store pictures and video, all very nice examples.

Chapter 8 is interesting as it builds a game! Behind the scenes it's using the HTML5 canvas, multi-touch gestures and the accelerometer. It's also reusing some of the things you learned in previous chapters like the file api, but it expands now to use localStorage.

The final two chapters are about expanding PhoneGap with native functions from the device and supporting bigger mobile devices like the iPad.

As you can see, a lot of ground is covered, with all excellent and useful examples!

Before, I only played a bit with PhoneGap, but I didn't find it hard to follow the content. I found the chapters well structured. I like to know why I'm doing something, so it was great to see that was covered first and then it builds up by designing the app (UI/interactions), the data model, putting it together and wrapping it up. You need a good understanding of HTML and JavaScript to follow the examples, but the author highlights that too in the Preface.


  1. great info there...thanks a lot for the post

  2. Thanks for the post this is useful post for me...

  3. It is mostly develop of illustrations, which is a fantastic way to see the prospective of the device. The writer begins with providing a brief summary what PhoneGap is and where it suits in.

  4. Great to know the -- in depth from this blog.This will really help for my forward steps to be taken.

  5. PhoneGap is the only application which is open source and used to develop mobile applications in varies mobile devices such as iPhone, Android, BlackBerry, Symbian, Windows and so on. Such kind of e-book helps to build mobile applications in effective manners.

  6. For building cross platform mobile applications Phonegap is widely used. PhoneGap is an open source framework. The developers build use of Html rule, CSS, and JavaScript to make impressive and rich applications.This kind of e-book helps to build mobile applications in useful manners.