Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
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
$29.99 $43.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.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 2. ECMAScript 2015 and Browserify

JavaScript has quickly become the lingua franca of the Web and the language's syntax and semantics have long been in need of improvements. ECMAScript 2015 introduces a lot of syntactic sugar that makes writing JavaScript easier. It also provides many new useful concepts that simplify application development. We briefly introduced you to ES2015 in the previous chapter. We'll be delving deeper into ES2015, as it's important that you become familiar with what the new syntax looks like.

Furthermore, it can be extremely useful to reuse your own work and that of others as well. But doing so would require you to manage your dependencies and ensure that the appropriate libraries are included. Doing this manually can be painful; but you can leverage a tool such as Browserify to assist. Browserify is a utility that not only packages your JavaScript files along with their dependencies, but also provides a Node.js-like environment for...

Getting started

Several of the snippets in this chapter are also available using the interactive snippet playground that accompanies the code package of this book. Instructions to launch the playground are in the README.md file in the code package. Once it starts, select 2: ES2015 and Browerify and then browse and experiment with the examples in the adjacent dropdown. Where applicable, each section and snippet will indicate which example you should select.

Benefits of ES2015

Although we briefly touched upon ES2015 (ECMAScript 2015) in the previous chapter, it's possible that you may not be very familiar with it. Most browsers (especially mobile) do have full support for ES2015, if any at all. This is unfortunate, because there are tremendous improvements in syntax and semantics that make it easier to create complex mobile applications.

Thankfully, as you saw in the previous chapter, there are tools that port this functionality back to ES5, which is very well supported in modern browsers. These tools convert the ES2015 syntax and semantics into their ES5 equivalent (where possible). Where a perfect equivalence is not possible, the conversion will get as close as possible, which will still bring us great benefit.

We can't go over every new change in ES2015 in this book; but we do need to go over some common examples, especially if you aren't familiar with the syntax.

Note

If you are developing for older devices, you will want to...

Using Browserify

Very few applications require completely custom code. Most applications can benefit from modularization and code reuse, and it's important to use modularization to your benefit so that you can build apps more efficiently.

There's a syndrome common to many developers (and even some companies): the not-invented-here syndrome. The afflicted developer (or company) is extremely hesitant to use code, algorithms, or any other assets that they themselves didn't create. It's easy to see where this syndrome comes from—it ensures that one can't be held liable for third-party code, one can't be sued for improperly licensing assets, and so on; but it also means that one must continually reinvent the wheel. This invariably results in buggier, less secure algorithms, as everyone is always attempting to build their apps completely from scratch.

If you've worked through other books on mobile application development, chances are you've already...

Summary

We've covered quite a bit in this chapter—most of it is related to the new syntax and features that ES2015 is bringing. Furthermore, we covered how to import npm modules and utilize them in our own code.

In the next chapter, we'll work on building modular CSS files with Sass. We'll also see how to integrate this into our build process.

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
$19.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
$199.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
$279.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 $ 158.97
PhoneGap By Example
$48.99
PhoneGap 4 Mobile Application Development Cookbook
$54.99
Mastering PhoneGap Mobile Application Development
$54.99
Total $ 158.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.