Book Image

PhoneGap 3 Beginner's Guide

By : Giorgio Natili
Book Image

PhoneGap 3 Beginner's Guide

By: Giorgio Natili

Overview of this book

<p>You don’t have to know complex languages like Objective C to compete in the ever-growing mobile market place. The PhoneGap framework lets you use your web development skills to build HTML and JavaScript-based mobile applications with native wrappers that run on all the major mobile platforms, including Android, iOS, and Windows Phone 8.</p> <p>"PhoneGap 3 Beginner's Guide" will help you break into the world of mobile application development. You will learn how to set up and configure your mobile development environment, implement the most common features of modern mobile apps, and build rich, native-style applications. The examples in this book deal with real use case scenarios, which will help you develop your own apps, and then publish them on the most popular app stores.</p> <p>Dive deep into PhoneGap and refine your skills by learning how to build the main features of a real world app.</p> <p>"PhoneGap 3 Beginner's Guide" will guide you through the building blocks of a mobile application that lets users plan a trip and share their trip information. With the help of this app, you will learn how to work with key PhoneGap tools and APIs, extend the framework’s functionality with plug-ins, and integrate device features such as the camera, contacts, storage, and more. By the time you’re finished, you will have a solid understanding of the common challenges mobile app developers face, and you will know how to solve them.</p>
Table of Contents (22 chapters)
PhoneGap 3 Beginner's Guide
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The evolution of PhoneGap from 1.4 to 3.x


PhoneGap has evolved very quickly since January 2012, with ten releases in the first nine months of 2012. Projects such as NodeJS and Gnome , among others, use odd MINOR version numbers to denote development releases. It's a very good practice that tells developers whether a release has major or minor improvements.

Apache Cordova follows the guidelines defined in the Semantic Versioning specification (more information is available at http://semver.org/), which seeks to address one of a developer's nightmares: dependency hell. The Semantic Versioning specification codifies the long-standing de facto version schema of X.Y.Z where X denotes MAJOR changes, Y represents MINOR updates, and Z is a PATCH to the minor update stream.

Since the 1.4 release, the project has been known as Apache Cordova. This release is generally considered the first stable release of the framework, with a fairly complete and up-to-date documentation. The 1.5 release fixed a long list of bugs, but the initial reaction of the community was not very favorable because the documentation was outdated and some changes to the main files caused broken build issues to apps developed with earlier releases. The 1.6 release brought some improvements to the plugin architecture, the Camera and Compass APIs, and the project template files. As is often the case with a maturing community, the release was not perfect but there was a significant improvement in the overall quality compared to the previous release. The 1.7 and 1.8 releases were bug fixes and added support for Bada 2.0. The community reaction was positive also because of the speed of the releases. The 1.9 release addressed even more bug fixes and added support for the new features of the iOS and Android platforms.

Apache Cordova 2.x added the following features and support:

  • The definition of a unique JavaScript file to use across all platforms thanks to the unification of the JavaScript layer of the Cordova application framework

  • The introduction of a command line tool (CLI) through which common operations, such as project creation, debug, and emulation, can be performed in a standard way (Android, iOS, and BlackBerry)

  • The capability to embed PhoneGap applications into larger native iOS and Android applications using Cordova WebView

  • Support for the Windows phone platform

  • The porting of the Web Inspector Remote (Weinre) to nodejs and the introduction of a node module that facilitates installation using Node package manager (npm)

  • An improved plugin documentation and support thanks to a plugman Node.js application able to install compliant plugins

  • Several improvements to the process of creating iOS apps

  • The introduction of the long-awaited InAppBrowser API (formerly called ChildBrowser)

  • The standardization of the commands available for each platform (i.e., build, run, and so on)

  • Full support for Windows Phone 8

With the 2.x release, Apache Cordova and PhoneGap have become a mature, stable, and powerful tool in the mobile developer's toolkit. The upcoming PhoneGap 3.x will no longer support BlackBerry 7 and will add support for Ubuntu and Firefox OS. Since PhoneGap 3.x the APIs work like plugins and can be installed and uninstalled using the updated cordova cli utility, enabling the PhoneGap core to be slim and better performing. PhoneGap 3.x also comes with a better set of command-line tools; for instance, the phonegap npm module allows you to build your app using the command line and the online PhoneGap Build service. For a good overview of the major changes in PhoneGap 3.x refer to the blog post at http://phonegap.com/blog/2013/06/20/coming-soon-phonegap30/.