Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Mastering PhoneGap Mobile Application Development
Mastering PhoneGap Mobile Application Development

Mastering PhoneGap Mobile Application Development: Take your PhoneGap experience to the next level and create engaging real-world applications

eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Mastering PhoneGap Mobile Application Development

Chapter 1. Task Automation

While developing your app, there are often many tasks that need to be executed on a recurring basis. Although these tasks are rarely difficult or terribly time-consuming, over time, the effort adds up and it quickly becomes tiresome and error-prone.

Task automation simplifies these tiresome rituals. Automation lets you define the steps for tasks that you frequently execute (and even those that you execute infrequently, which may be even more useful). In a way, you could consider task automation similar to macros in other productivity applications you might use (such as Microsoft Word).

Individual tasks can also depend on other tasks, so you can simplify your manual processes to one or two easy-to-remember and easy-to-type commands. Furthermore, most task automation utilities provide a mechanism to watch for changes made to your project, automatically executing various tasks when any changes have been detected.

Technically, task automation isn't required while developing a PhoneGap / Cordova app; but as your apps grow larger and more complex, it becomes increasingly beneficial. There is some initial overhead, of course, which is often why small projects never implement task automation. But when an app has several views, lots of modules, and a good number of dependencies, the initial overhead quickly pays off.

Note

Although this book is titled Mastering PhoneGap Mobile Application Development, we will be using Cordova to refer to PhoneGap and Cordova. PhoneGap is derived from Cordova and everything we do using Cordova will also work with PhoneGap. Where this doesn't hold true, we'll mention it explicitly.

Also, when we're referring to Cordova and PhoneGap, we are referring to the command-line utilities. There is a PhoneGap Build service available that performs compilation and packaging in the cloud; but if you want to use it, you'll need to adapt the content in this book appropriately. If you want to learn more, see the README.md file in the code package for this book.

There are several different task automation utilities available. Because one generally writes the majority of their Cordova app in HTML, CSS, and JavaScript, it makes sense to select a task automation system based on JavaScript. At the time of this writing, Gulp (http://gulpjs.com) and Grunt (http://gruntjs.com) are the most popular of the various available utilities.

In this chapter, you will learn about:

  • Logology, the demonstration app
  • Why use Gulp for Task Automation
  • Setting up your app's directory structure
  • Installing Gulp
  • Creating your first Gulp configuration file
  • Creating a modular Gulp configuration
  • Copying assets
  • Performing substitutions
  • Executing various Cordova tasks
  • Managing version numbers
  • Supporting ES2015
  • Linting your code
  • Minifying/uglifying your code

Before we begin

This book comes with a code bundle that is available at https://github.com/kerrishotts/Mastering-PhoneGap-Code-Package. If you haven't downloaded it yet, I strongly advise you to do so. It contains all the code for each chapter as well as lots of snippets that demonstrate some of the examples in most chapters. Furthermore, the chapters in the book focus mostly on snippets—to see the topics in use in an actual application, you'll definitely want to look at the demonstration app's code.

Before continuing with this chapter, ensure that you have met the pre-requisites as listed in this book's preface. Software and hardware requirements are also listed in the code package for this book in the README.md file.

If you want to build and deploy the demonstration application from the code bundle, you'll need to install the earlier mentioned tools. Because the Cordova projects and platform-specific files are considered build artifacts, you'll need to execute the following in each chapter's directory in order to build each version of the app:

# On Linux / Mac OS X (using Bash shell)
$ npm install && gulp init

% On Windows
> npm install
> gulp init

About Logology

Before we go any further, let's describe the demonstration app we'll be building through the course of this book.

I've called it Logology. If you're familiar with any Greek words, you might have already guessed what the app will be: a dictionary. Now, I understand that this is not necessarily the most amazing app, but it is sufficient for our purposes. It will help you learn how advanced mobile development is done.

By the end of the book, the app will have the following features:

  • Search: The user will be able to search for a term
  • Responsive design: The app will size itself appropriately to any display size
  • Accessibility: The app will be usable even if the user has visual difficulties
  • Persistent storage: The app will persist settings and other user-generated information

Although the app sounds relatively simple, it's complex enough to benefit from task automation. Since it is useful to have task automation in place from the very beginning, in this chapter we'll install Gulp and verify that it is working with some simple files first. As such, the app in the code package for this first chapter is very simple; it exists solely to verify that our tasks are working correctly.

You may think that working through configuring task automation is very time-consuming, but it will pay off in the long run. Once you have a workflow that you like, you can take the workflow and apply it to any other apps you may build in the future. This means that future apps can be started almost immediately (just copy the configuration from the previous app). Even if you don't write other apps, the time you save from having a task runner will outweigh the initial setup time.

Why use Gulp for task automation?

Gulp (http://gulpjs.com) is a task automation utility using the Node.js platform. Unlike some other task runners, one configures Gulp by writing a JavaScript code. The configuration for Gulp is just like any other JavaScript file, which means that if you know JavaScript, you can start defining the automation tasks quickly.

Gulp also uses the concept of streams (again, from Node.js). Although you can think of a stream as a file, streams are actually more powerful. Plugins can be inserted within steam processing to perform many different transformations, including beautification or uglification, transpilation (for example, ECMAScript 6 to ECMAScript 2015), concatenation, packaging, and much more.

Tip

If you've performed any sort of piping on the command line, Gulp should feel familiar to you, because it operates on a similar concept. The output from one process is piped to the next process, which performs any number of transformations, and so on, until the final output is written to another location.

Gulp also tries to run as many dependent tasks in parallel as possible. Ideally, this makes it possible to run Gulp tasks faster, although this really depends on how your tasks are structured. Other task runners such as Grunt perform their task steps in a sequence that may result in a slower output, although it may be easier to follow the steps from input to output when they're performed sequentially.

That's not to say that Gulp is the best task runner—there are many that are quite good, and you may find that you prefer one of them over Gulp. The skills you will learn in this book can easily be transferred to other task automation utilities.

Here are some other task runners that are useful:

Setting up your app's directory structure

Before we install Gulp, we should create the directory structure for our app. Keep in mind that there's no single correct way to structure your application, and your opinion on how apps should be structured is likely to change as you gain more experience. That said, this section will show you how I like to structure my projects.

My typical structure starts with the project's root directory. If you look at the code bundle for this book, you'll notice that the project's root directory is called logology-v01/.

Note

I wouldn't normally append the version number on a project—that's what a version control system is for. However, since it is important that you be able to see changes from version to version, the code package splits these changes out by chapter—hence the version number

Within the project's root directory are some additional directories:

  • config/: Configuration files needed during the tasks are stored in this directory.
  • src/: All the app's source code and image assets are stored in this directory. This is the source that we supply to Gulp. Gulp then transforms the source and stores it in a directory of our choosing (typically the build directory).
  • build/: This directory contains the transformed HTML, CSS, and JavaScript code, as well as the native portions of a Cordova project.

Note

The build/ directory will not be present in the code bundle for this book. It is considered a build artifact, and as such, you can always regenerate it.

Within the src/ directory lives our app's source code. I like to structure the code and assets as follows:

project-root/
  src/
    config.xml            # Template file for our Cordova app's
                          # configuration
    res/                  # Icons & splash screens (covered in
                          # Chapter 11)
    www/                  # HTML, JavaScript, and CSS, and other
                          # web assets
      index.html          # Initial HTML file (as specified in
                          # config.xml)
      html/               # Additional HTML files, if any
      img/                # Image files, if we need them
      scss/               # Sassy CSS files (see Chapter 3)
        lib/              # Utility functions
        themes/           # Themes (appearance of the app)
        views/            # Styles specific to views in our app
      js/                 # JavaScript
        lib/              # Third-party library code and support
                          # code
        app/              # Our application code
          index.js        # The entry point for our app
          controllers/    # View controllers live here
          lib/            # App-specific utility files
          localization/   # Language translations
          models/         # Data models go here
          views/          # Views and templates live here

If you look at the directory structure of this chapter in the code bundle, you will notice that a lot of it is missing. This is because it's not necessary at this point; we'll fill it out in the future chapters.

If you're wondering where the Cordova files are, you're paying attention. There aren't any. Yet. This is because they are considered to be build artifacts. Build artifacts are files that are created when you compile your app. If this feels both a little strange and a little familiar at the same time, there's a good reason behind it: the Cordova projects already have portions that are considered to be build artifacts. The strange part is that you're probably used to editing the www/ folder within the Cordova project, and executing cordova build to create the remaining build artifacts (namely, the native wrappers around your code, typically in platforms/).

In this book, however, we're going to take a higher level approach and consider the entire Cordova project as a build artifact. Why? Because Cordova has been extended by several other projects (such as Steroids: http://www.appgyver.com/steroids) and they usually have their own project formats and build steps. If you ever want to target these platforms, you can readily do so since your code doesn't live within a Cordova project. Furthermore, you might find that you want to target other technologies entirely, such as Electron (http://electron.atom.io) which encapsulates your code with a Chromium webview suitable for desktop execution. The build steps and project structure for Electron are different than what you might expect for a Cordova project. In short, it's a way to avoid tying yourself down.

All said, when we're done with the chapter, you'll have a Cordova app filled with your source code. That project will be present in the build/ directory.

Tip

If you ever need to execute Cordova commands outside Gulp, you'll need to change to the build/ directory first or the command will fail. This is because the Cordova CLI expects be to run within a Cordova project, and our app's root directory isn't a Cordova project. Only build/ contains a valid Cordova project.

A crucial part of our workflow is going to be our project's package.json file. This file will contain the app's version information, Cordova configuration, and more. If you're starting from scratch, you will need to create this file yourself by changing to the project's root directory and executing npm init:

Note

If you are using the code bundle for this chapter, the package.json file is already built for you.

# (in your project's root directory)
$ npm init [ENTER]
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sane
defaults.


name: (logology-v01) Logology [ENTER]
version: (1.0.0) [ENTER]
description: Logology and PhoneGap demonstration app [ENTER]
entry point: (index.js) [ENTER]
test command: [ENTER]
git repository: [ENTER]
keywords: dictionary word study phonegapcordova html5 javascript
css [ENTER]
author: Kerri Shotts<kerrishotts@gmail.com> [ENTER]
license: (ISC) MIT [ENTER]
About to write to .../logology-v01/package.json:

Is this ok? (yes) [ENTER]

At this point, you have the package.json file is created, but it will need a few more edits. Open the package.json file in your favorite editor and remove the scripts section. Then, add the following (for the full contents of this file you can refer to the code package):

{ ...,
"cordova": {
  "name": "Logology",
  "id": "com.packtpub.logologyv1",
  "description": "Dictionary application",
  "author": {
    "name": "Kerri Shotts",
    "email": "kerrishotts@gmail.com",
    "site": "http://www.photokandy.com"
  },
  "template": "../blank",
  "platforms": [ "ios", "android" ],
  "preferences": {
    "permissions": "none",
    "fullscreen": "false",
    "orientation": "default",
    "stay-in-webview": "false",
    "ShowSplashScreenSpinner": "false",
    "AutoHideSplashScreen": "false",
    "disable-cursor": "false",
    "KeyboardDisplayRequiresUserAction": "false",
    "target-device": "universal",
    "prerendered-icon": "true",
    "webviewbounce": "false",
    "DisallowOverscroll": "true",
    "exit-on-suspend": "false",
    "deployment-target": "7.0",
    "detect-data-types": "false",
    "SupressesIncrementalRendering": "true",
    "android-minSdkVersion": "14",
    "android-installLocation": "auto",
    "android-windowSoftInputMode": "adjustResize",
  },
  "plugins": [
    "cordova-plugin-device@1.1.0",
    "cordova-plugin-network-information@1.1.0",
    "cordova-plugin-globalization@1.0.2",
    "cordova-plugin-whitelist@1.1.0",
    "ionic-plugin-keyboard@1.0.8",
    "cordova-plugin-inappbrowser@1.0.1"
    ]
  }
}

The preceding code should be fairly self-explanatory. With it, we are essentially duplicating the contents of Cordova's config.xml file. Because the Cordova project itself is considered to be a build artifact, it makes sense to manage plugins, platforms, and preferences somewhere else and, because package.json handles the other configuration aspects of our project, it makes sense to include these configuration settings here.

Note

This doesn't remove the need for a config.xml file. We'll cover this later on in this chapter.

At this point, we're ready to install Gulp and any other dependencies our project might need.

Installing Gulp

Installing Gulp is easy, but is actually a two-step process. The first step is to install Gulp globally. This installs the command-line utility; but Gulp won't work without also being installed locally within our project. If you aren't familiar with Node.js, the packages can be installed locally and/or globally. A locally installed package is local to the project's root directory, while a globally installed package is specific to the developer's machine. Project dependencies are tracked in package.json, which makes it easy to replicate your development environment on another machine.

Assuming you have Node.js installed and package.json created in your project directory, the installation of Gulp will be very easy. Be sure you are positioned in your project's root directory and then execute the following:

$ npm install -g gulp@3.9.0
$ npm install --save-dev gulp@3.9.0

Note

If you receive an error while running these commands on OS X, you may need to run them with sudo. For example: sudo install -g gulp.

You can usually ignore any WARN messages.

Notice that we're specifying version numbers here – these are the versions that I used while writing the code for this book. You can try later versions if you want, as long as they are minor revisions. Major revisions may work, but you may also have to make modifications to the code in this book in order to support them.

Tip

It's a good idea to be positioned in your project's root directory any time you execute an npm or gulp command. On Linux and OS X, these commands generally locate the project's root directory automatically; but this isn't guaranteed on all platforms, so it's better to be safe than sorry.

That's it! Gulp itself is very easy to install, but most workflows require additional plugins that work with Gulp. In addition, we'll also install the Cordova dependencies for this project.

Note

If you're working with the code bundle for this chapter, you can install all the following dependencies by executing npm install.

First, let's install the Cordova dependencies:

$ npm install --save-dev cordova-lib@5.4.1 cordova-ios@3.9.2 cordova-android@4.1.1

cordova-lib allows us to programmatically interact with Cordova. We can create projects, build them, and emulate them—everything we do with the Cordova command line can be done with cordova-lib. cordova-ios and cordova-android refer to the iOS and Android platforms that cordova platform add ios android would add. We've made them dependencies for our project, so we can easily control which version we will build it with.

Tip

While starting a new project, it's wise to start with the most recent version of Cordova and the requisite platforms. Once you begin, it's usually a good practice to stick with a specific platform version, unless there are serious bugs or security issues that require updating to a newer platform version..

Next, let's install the Gulp plugins we'll need:

$ npm install --save-dev babel-eslint@4.1.1 cordova-tasks@0.2.0 gulp-babel@5.2.1 gulp-bump@0.3.1 gulp-concat@2.6.0 gulp-eslint@1.0.0 gulp-jscs@3.0.2 gulp-notify@2.2.0 gulp-rename@1.2.0 gulp-replace-task@0.10.1 gulp-sourcemaps@1.3.0 gulp-uglify@1.4.0 gulp-util@3.0.6 merge-stream@1.0.0 require-all@1.1.0 rimraf@2.4.3

These will take a few moments to install; but when you're done, take a look at package.json. Notice that all the dependencies we added are also added to the devDependencies section in the file. This makes it easy to install all the project's dependencies at a later date (say, on a new machine) simply by executing npm install.

Before we go on, let's quickly go over what each of the earlier mentioned utilities do. We'll go over them in more detail as we progress through the remainder of this chapter:

  • gulp-babel: Converts ES2015 JavaScript into ES5. If you aren't familiar with ES2015, it has several new features and an improved syntax that make writing mobile apps easier. Unfortunately, because most browsers don't yet natively support the ES2015 features and syntax, it must be transpiled to the ES5 syntax. Of course, if you prefer other languages that can be compiled to ES5 JavaScript, you could use those as well (these would include CoffeeScript and so on).
  • gulp-bump: This small utility manages the version numbers in package.json.
  • gulp-concat: This concatenates streams together. We can use this to bundle files together.
  • gulp-jscs: This performs the JavaScript code style checks against your code. It supports ES2015.
  • gulp-eslint: This lints your JavaScript code. It supports ES2015.
  • babel-eslint: This provides ES2015 support to gulp-eslint.
  • gulp-notify: This is an optional plugin, but it comes in handy, especially when some of your tasks take a few seconds to run. This plugin will send a notification to your computer's notification panel when something of import occurs—perhaps an error or a completion message. If the plugin can't send it to your notification panel, it will be logged to the console.
  • gulp-rename: This renames the streams.
  • gulp-replace-task: This performs text searches and replaces within the streams.
  • gulp-sourcemaps: While transpiling ES2015 to ES5, it can be helpful to have a mapping between the original source and the transpiled source. This plugin creates them automatically for you.
  • gulp-uglify: This uglifies/minifies your code. While useful for code obfuscation, it also reduces the size of the code.
  • gulp-util: This provides additional utilities for Gulp, such as logging.
  • merge-stream: This merges multiple tasks.
  • require-all: This lets us import an entire directory of code into an object at once.
  • rimraf: Easy file deletion. Akin to rm on the command line.

Creating your first Gulp configuration file

Gulp tasks are defined by the contents of the project's gulpfile.js file. This is a JavaScript program, so the same skills you have with JavaScript will apply here. Furthermore, it's executed by Node.js, so if you have any Node.js knowledge, you can use it to your advantage.

Tip

This file should be placed in the root directory of your project and must be named gulpfile.js.

The first few lines of your Gulp configuration file will require the Gulp plugins you'll need to complete the tasks. The following lines will then specify how the various tasks need to be performed. For example, a very simple configuration might look as follows:

var gulp = require("gulp");
gulp.task("copy-files", function () {
  gulp.src(["./src/**/*"])
      .pipe(gulp.dest("./build"));
});

This configuration only performs one task: it moves all the files contained within src/ to build/. In many ways, this is the simplest form of a build workflow, but it's a bit too simple for our purposes.

Tip

Note the pattern we used to match all the files. If you need to see the documentation on what patterns are supported, see https://www.npmjs.com/package/glob.

To execute the task, you can execute gulp copy-files. Gulp would then execute the task and copy all the files from src/ to build/.

What makes Gulp so powerful is the concept of task composition. Tasks can depend on any number of other tasks and those tasks can depend on yet more tasks. This makes it easy to create complex workflows out of simpler pieces. Furthermore, each task is asynchronous, so it is possible for many tasks with no shared dependencies to operate in parallel.

Each task, as you can see in the prior code, is comprised of a selection of a series of source files (src()), optionally performing some additional processing on each file (via pipe()) and then writing those files to a destination path (dest()). If no additional processing is specified (as in the prior example), Gulp will simply copy the files that match the wildcard pattern. The beauty of streams, however, is that one can execute any number of transformations before the final data is saved. So, the workflows can become very complex.

Now that you've seen a simple task, let's get into some more complicated tasks in the next section.

Left arrow icon Right arrow icon

Key benefits

  • Create a useful PhoneGap workflow for larger projects in order to simplify and manage the development process
  • Use third-party plugins, IndexedDB, and SQLite for PhoneGap to develop large-scale, data-driven, and highly accessible applications
  • A pragmatic guide to construct top-notch large-scale applications using PhoneGap

Description

PhoneGap is a useful and flexible tool that enables you to create complex hybrid applications for mobile platforms. In addition to the core technology, there is a large and vibrant community that creates third-party plugins that can take your app to the next level. This book will guide you through the process of creating a complex data-driven hybrid mobile application using PhoneGap, web technologies, and third-party plugins. A good foundation is critical, so you will learn how to create a useful workflow to make development easier. From there, the next version of JavaScript (ES6) and the CSS pre-processor SASS are introduced as a way to simplify creating the look of the mobile application. Responsive design techniques are also covered, including the flexbox layout module. As many apps are data-driven, you'll build an application throughout the course of the book that relies upon IndexedDB and SQLite. You'll also download additional content and address how to handle in-app purchases. Furthermore, you’ll build your own customized plugins for your particular use case. When the app is complete, the book will guide you through the steps necessary to submit your app to the Google Play and Apple iTunes stores.

Who is this book for?

If you have created simple applications using PhoneGap in the past and now want to take your workflow and apps to the next level, this book will help you reach your goals. You should have a good working knowledge of HTML, CSS, and JavaScript, and prior experience with PhoneGap.

What you will learn

  • Construct build workflows that simplify complex application development
  • Integrate the next version of JavaScript to simplify your code
  • Create accessible hybrid applications
  • Persist and query data using third-party database plugins
  • Create your own PhoneGap plugins for your unique use cases
  • Create icons and splash screens suitable for submission to app stores
  • Publish your app to the Google Play and Apple iTunes stores

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 24, 2016
Length: 392 pages
Edition : 1st
Language : English
ISBN-13 : 9781783288441
Category :
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Feb 24, 2016
Length: 392 pages
Edition : 1st
Language : English
ISBN-13 : 9781783288441
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 120.97
PhoneGap By Example
€36.99
PhoneGap 4 Mobile Application Development Cookbook
€41.99
Mastering PhoneGap Mobile Application Development
€41.99
Total 120.97 Stars icon
Banner background image

Table of Contents

13 Chapters
1. Task Automation Chevron down icon Chevron up icon
2. ECMAScript 2015 and Browserify Chevron down icon Chevron up icon
3. Sassy CSS Chevron down icon Chevron up icon
4. More Responsive Design Chevron down icon Chevron up icon
5. Hybrid Application Accessibility Chevron down icon Chevron up icon
6. Testing and UI Automation Chevron down icon Chevron up icon
7. IndexedDB Chevron down icon Chevron up icon
8. Web SQL Database Chevron down icon Chevron up icon
9. Transferring Files Chevron down icon Chevron up icon
10. Performance Chevron down icon Chevron up icon
11. Graphical Assets Chevron down icon Chevron up icon
12. Deployment Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(2 Ratings)
5 star 50%
4 star 0%
3 star 50%
2 star 0%
1 star 0%
G. Campbell Oct 17, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
As an enterprise PhoneGap developer, I was happy to find this book. It covers topics like Hybrid App Accessibility, testing (including Appium), in-device databases, and some topics on deployment that are difficult to find anywhere else. The other topics, such as automating the build were helpful too. If you want to step up your PhoneGap game, this is a good book.I bought the kindle version, and the presentation was quite readable. The text is well written and most topics include code samples and diagrams, as well as installation instructions for node modules and PhoneGap plugins.
Amazon Verified review Amazon
Jamie Feb 13, 2017
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Not a bad book but wasn't what I was looking for.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.