Book Review - PhoneGap Beginner's Guide
Disclaimer: I was kindly provided with a review copy of PhoneGap Beginner's Guide by Packt Publishing
Despite that fact that DevTrends is a .NET consultancy and does not even offer mobile development as a service, we do like to look at a wide range of non .NET technologies and platforms between projects. In the past, we have written apps for Android and Windows Phone but iOS has never been an option, mostly because of hardware constraints - it is hard to justify buying a Mac just to play around with writing iPhone apps for fun. PhoneGap is an interesting alternative to native mobile development and the PhoneGap Beginner's Guide is a welcome aid for getting up to speed with PhoneGap.
What is PhoneGap?
One thing that becomes clear once you read the book is that PhoneGap is not a 'write once and voila, native apps for all platforms' holy grail of mobile app development. You will almost certainly need to tweak your code for individual platforms and most importantly, you still require all the development IDE's, SDKs and emulators that you would for native, non-PhoneGap development. So for an iOS app, you need xCode and a Mac. If you intend to write an app for multiple platforms, PhoneGap does make this process significantly faster and easier though.
The PhoneGap Beginner's Guide
Whilst PhoneGap can be used to develop for most platforms, The PhoneGap Beginner's Guide concentrates on just three: iOS, Android and Blackberry. I was slightly surprised that Windows Phone did not get a mention. Having said that, most of what is discussed can be applied to all platforms.
The majority of the book is strongly focused on code examples followed by a few paragraphs walking the reader through the code. I generally like this approach but did find myself skipping some of the more rambling sections. As other reviewers have already noted, the book could have done with more editing to improve the readability of several sections. The tone of the book is very informal with the occasional geeky joke which may or may not appeal.
Chapters 7 to 9 introduce us to the PhoneGap API. We learn how to access device sensors, filesystem, camera and contacts. After five chapters of web dev talk, this is most welcome and surprisingly simple. This simplicity may be why so much non PhoneGap specific content is included in the book - it would be a very short book otherwise!
Chapter 10 encourages us to muddy our feet and write some native code in order to develop a PhoneGap plugin. There is lots of useful information here for those who need this functionality. Chapter 11 returns to HTML5 with caching and local storage options. Much of the chapter is devoted to Web SQL. Unfortunately, as we are told a couple of times in the book, Web SQL has been deprecated which makes the code rather pointless. Chapter 11 also (rather unnecessarily) introduces us to using Ruby and Sinatra to built a simple web service. I would argue that server side development has no place in this book and consuming a public web service in the example would have been a better idea.
Finally, we have two appendices. One of which discusses the laborious process of iOS deployment (very useful) and the other provides answers for the various pop quizzes scattered throughout the book.
I have to admit that I was initially disappointed by the large percentage of pages devoted to fairly standard front-end web development practices, interspersed by the occasional handy insight. The fact is though, there is not that much to write about the PhoneGap API itself. It is very easy to use and there is great documentation on the website, hence the reason that only three out of ten chapters deal with the API itself (and a further chapter deals with writing PhoneGap plugins). Whilst I did not find the HTML5/CSS3 focused chapters very useful, if you do not have much experience with web development, you may get more out of those initials chapters than I did.
Overall, there is plenty of useful information in this book that will certainly help anyone wanting to get started with PhoneGap. I would find this book much more useful if the non-essentials were removed and it was condensed into say 100 pages. As it is though, it is still a good introduction to an interesting framework.
Useful or Interesting?
If you liked the article, I would really appreciate it if you could share it with your Twitter followers.Share on Twitter
Comments are now closed for this article.