PhoneGap 3 Beginner's Guide


PhoneGap 3 Beginner's Guide
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
$22.94
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
$44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • Understand the fundamentals of cross-platform mobile application development from build to distribution
  • Learn to implement the most common features of modern mobile applications
  • Take advantage of native mobile device capabilities—including the camera, geolocation, and local storage—using HTML, CSS, and JavaScript

Book Details

Language : English
Paperback : 308 pages [ 235mm x 191mm ]
Release Date : September 2013
ISBN : 1782160981
ISBN 13 : 9781782160984
Author(s) : Giorgio Natili
Topics and Technologies : All Books, Mobile Application Development, Beginner's Guides, Open Source

Table of Contents

Preface
Chapter 1: Getting Started with PhoneGap
Chapter 2: Building and Debugging on Multiple Platforms
Chapter 3: Getting Started with Mobile Applications
Chapter 4: Architecting Your Mobile App
Chapter 5: Improving the User Interface and Device Interaction
Chapter 6: Using Device Storage and the Contacts API
Chapter 7: Accessing Device Sensors
Chapter 8: Using Location Data with PhoneGap
Chapter 9: Manipulating Files
Chapter 10: Capturing and Manipulating Device Media
Chapter 11: Working with PhoneGap Plugins
Appendix A: Localizing Your App
Appendix B: Publishing Your App
Appendix C: Pop Quiz Answers
Index
  • Chapter 1: Getting Started with PhoneGap
    • PhoneGap and Apache Cordova
    • The evolution of PhoneGap from 1.4 to 3.x
    • A note about operating systems
    • A note about the command-line tool
    • Installing PhoneGap
    • Installing dependencies
    • Setting up your development environment
    • Time for action – setting up Android using PhoneGap 2.x
    • Time for action – setting up iOS using PhoneGap 2.x
    • Time for action – setting up Windows Phone using PhoneGap 2.x
    • Getting Started with Android and Eclipse
    • Time for action - installing ADT into Eclipse
    • Getting started with iOS and Xcode
    • Getting started with Windows Phone and Visual Studio
    • Creating a common code base for multiplatform apps
    • Summary
    • Chapter 2: Building and Debugging on Multiple Platforms
      • Development tools
        • Sublime Text
        • IntelliJ IDEA
        • Adobe Brackets
      • Time for action – configuring the cloud service in Bracket
        • Eclipse
      • Native, web, and hybrid apps
      • Working with desktop browsers
        • WebKit debugging (Chrome, Safari, and Opera)
        • Gecko debugging (Firefox)
        • Internet Explorer 10
      • Mobile debugging workflow
      • Remote debugging
        • Using iWebInspector (OS X only)
      • Time for action – configuring iWebInspector for iOS debugging
        • Debugging with weinre
      • Time for action – configuring Node.js and weinre
        • Wireless debugging with Adobe Edge Inspect
      • Time for action – integrating Edge Inspect and weinre
        • iOS 6 remote debugging
      • Mimicking mobile counterparts
      • Summary
      • Chapter 3: Getting Started with Mobile Applications
        • Mobile-centric HTML/CSS/JavaScript
          • The viewport meta tag
          • Unwanted telephone number linking
          • Autocorrect
          • CSS media queries and mobile properties
          • JavaScript for mobile 101
            • querySelector and querySelectorAll
            • addEventListener
          • Screen orientation
          • Device orientation
          • Shake gestures
          • Media capture API
          • Data URI
        • Performance best-practices
        • Understanding screen size and pixel density
        • Time for action – scaling UI images according to pixel density
        • Writing effective JavaScript
          • Loose coupling
          • Event handling best practice
        • Choosing web app templates
          • HTML5 Mobile Boilerplate
          • Foundation
          • Bootstrap
          • jQuery Mobile
          • Which is the right one?
        • Setting up your project using cordova-cli
        • Time for action – installing cordova-cli using npm
        • Your first application – "Hello World"
        • Time for action – creating your first cross-platform app
          • Add interactivity to your app
        • Time for action – programmatically opening a modal window using Bootstrap
        • Achieving a native look and feel on iOS
        • Time for action – setting up a native-like CSS for your app
        • Summary
        • Chapter 4: Architecting Your Mobile App
          • Fine-tuning your development environment
            • Speeding up folder access with jump (OS X)
            • Creating a server alias with serve
            • Customizing your shell with iTerm2 (OS X)
          • Time for action – customizing the shell
            • Let LiveReload refresh pages for you (OS X)
          • Time for action – enabling Live Reload
          • Reviewing the JavaScript guidelines
          • Exploring the sample app
            • The navigation flow
            • The app architecture
            • Communication between modules
            • The anatomy of a module
          • Building the app's core
            • Bootstrap loader
          • Time for action – Require.js Bootstrap
            • Mustache templates
          • Time for action – creating a Mustache template
            • Template initialization
          • Time for action – loading and parsing a template
          • The splash screen
          • Time for action – adding a splash screen to your app
          • Summary
          • Chapter 5: Improving the User Interface and Device Interaction
            • Exploring JavaScript compression
              • Google Closure Compiler
            • Time for action – compressing files using the Closure Compiler
              • UglifyJS2
            • Time for action – using UglifyJS with the Closure Compiler
              • Optimization with Require.js
            • Time for action – optimizing JavaScript with Require.js
            • Comparing compression tools
            • Using template engine compression
            • Time for action – compiling a template using pistachio
            • Handling a retina display user interface
            • Time for action – user interface elements and retina display
            • Creating fluid, multiple app views
              • PhoneGap lifecycle events
            • Time for action – accessing the device API
              • App views
            • Time for action – creating the templates
              • Navigation between views
            • Using hardware-accelerated transitions
              • Alice.js
            • Getting started with the PhoneGap APIs
            • Exploring the Connection API
            • Summary
            • Chapter 6: Using Device Storage and the Contacts API
              • Application data storage
                • Exploring the PhoneGap LocalStorage API
              • Time for action – reading and writing data on the LocalStorage
                • Exploring the PhoneGap SQL storage
                • Database storage with PhoneGap
              • Time for action – populating a local database
              • Database limitations
              • The Contacts API
                • The ContactName object
                • The ContactField object
                • The ContactAddress object
                • The ContactOrganization object
                • The Contact object
                • Filtering contact data
              • Time for action – filtering device contacts
              • Summary
              • Chapter 7: Accessing Device Sensors
                • What are device sensors?
                  • Sensors and human-computer interaction
                • Accelerometer
                  • Detecting shakes
                • Time for action – detecting shakes in your app
                  • Device orientation events
                  • Handling orientation with JavaScript
                • Time for action – handling device orientation with JavaScript
                • Compass
                  • Creating a compass
                • Time for action – using the Compass API
                • Summary
                • Chapter 8: Using Location Data with PhoneGap
                  • An introduction to Geolocation
                  • The PhoneGap Geolocation API
                  • Time for action – showing device position with Google Maps
                    • Other Geolocation data
                  • Time for action – discovering places with Google Places
                  • Summary
                  • Chapter 9: Manipulating Files
                    • Understanding the Files API
                      • Reading directories and files
                    • Time for Action – listing folders and files recursively
                      • Writing and reading a file's data
                    • Time for Action – reading and rendering an Image
                      • Transferring files
                    • Time for Action – downloading and saving a file
                    • Summary
                    • Chapter 10: Capturing and Manipulating Device Media
                      • Camera API or Capture API?
                      • Accessing the camera using the Camera API
                      • Time for action – accessing the device camera
                        • Controlling the camera popover
                      • Time for action – controlling the position of the camera roll
                      • The Capture API
                      • Time for action – manipulating images with a canvas
                      • Summary
                      • Chapter 11: Working with PhoneGap Plugins
                        • Introduction to plugins
                          • Getting started with plugins
                          • Using plugins with Plugman
                          • The anatomy of a plugin
                        • Working with plugins
                          • The Push Notifications plugin
                        • Time for action – using push notifications on Android
                        • Summary
                          • Appendix B: Publishing Your App
                            • Publishing on Google Play
                            • Publishing on the Blackberry World
                            • Publishing on the Apple App Store
                            • Publishing on the Windows Phone Store
                            • Summary
                            • Appendix C: Pop Quiz Answers
                              • Chapter 2, Building and Debugging on Multiple Platforms
                              • Chapter 3, Getting Started with Mobile Applications
                              • Chapter 4, Architecting Your Mobile App
                              • Chapter 5, Improving the User Interface and Device Interaction
                              • Chapter 6, Using Device Storage and the Contacts API
                              • Chapter 7, Accessing Device Sensors
                              • Chapter 8, Using Location Data with PhoneGap
                              • Chapter 9, Manipulating Files
                              • Chapter 10, Capturing and Manipulating Device Media
                              • Chapter 11, Working with PhoneGap Plugins

                              Giorgio Natili

                              Giorgio Natili is an author, educator, community leader, W3C member, and founder of www.gnstudio.com—a boutique Rome-based development and design studio, specializing in engaging and accessible web and mobile experiences. A strong proponent of agile development practices, his areas of expertise include standards-based application development, client-side scripting, gaming, and video streaming. His previous speaking engagements include Adobe Max, 360|Flex, FITC, XP 2010 and 2012, 360|Stack 2013, and several community-driven conferences. Also, he is the founder of the community www.codeinvaders.net and the main organizer of the Mobile Tea, Italy conference.
                              Sorry, we don't have any reviews for this title yet.

                              Code Downloads

                              Download the code and support files for this book.


                              Submit Errata

                              Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                              Errata

                              - 1 submitted: last submission 25 Oct 2013

                              Errata category: Others
                              NOTE: In the first chapter PhoneGap 2.x is explained as it will help to know how to use the old version. All the examples in the book are updated to PhoneGap 3.0. 

                              Sample chapters

                              You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                              Frequently bought together

                              PhoneGap 3 Beginner's Guide +    PhoneGap 3.x Mobile Application Development Hotshot =
                              50% Off
                              the second eBook
                              Price for both: €30.90

                              Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                              What you will learn from this book

                              • Set up and configure your development environment
                              • Manage cross-platform code bases
                              • Build well-performing modular apps
                              • Interact with the device sensors, file system, and camera
                              • Use key PhoneGap APIs
                              • Integrate native code in your mobile app
                              • Write a PhoneGap plugin
                              • Localize a mobile app

                              In Detail

                              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.

                              "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.

                              Dive deep into PhoneGap and refine your skills by learning how to build the main features of a real world app.

                              "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.

                              Approach

                              Written in a friendly, example-driven Beginner’s Guide format, there are plenty of step-by-step instructions to help you get started with PhoneGap.

                              Who this book is for

                              If you are a web developer or mobile application developer interested in an examples-based approach to learning mobile application development basics with PhoneGap, then this book is for you.

                              Code Download and Errata
                              Packt Anytime, Anywhere
                              Register Books
                              Print Upgrades
                              eBook Downloads
                              Video Support
                              Contact Us
                              Awards Voting Nominations Previous Winners
                              Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                              Resources
                              Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software