PhoneGap By Example
eBook - ePub

PhoneGap By Example

  1. 368 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

PhoneGap By Example

Book details
Book preview
Table of contents
Citations

About This Book

Use PhoneGap to apply web development skills and learn variety of cross-platform mobile applications

About This Book

  • Utilize the robust features of the mobile hybrid approach to develop, test, and publish mobile applications using the PhoneGap framework
  • Use your web skills for hybrid mobile application development and deliver to many mobile platforms without rewriting the code
  • Develop a set of ready-to-use mobile applications with this practical, comprehensive, step-by-step guide

Who This Book Is For

If you are a web developer with some experience in development of single page applications and want to enter the world of mobile applications, then this technology and book is ideal for you. Since PhoneGap maintains an incredibly easy-to-use plugin interface, no previous experience in native languages development (such as Objective-C or Java) is required.

What You Will Learn

  • Set up plugins to access the camera and filesystem to capture media
  • Build a custom RESTful service and integrate it with a PhoneGap application
  • Integrate a HTML5 Canvas element to create mobile games
  • Build scalable applications using a modern mobile web framework
  • Interact with RESTful services from a mobile application
  • Build an audio/video chat facility using PhoneGap and WebRTC technologies
  • Develop a PhoneGap plugin with native interfaces for iOS and Android
  • In Detail

    PhoneGap is a free and open source framework that allows you to create mobile apps using standardized web APIs for the platforms you care about. It is one of the first and fastest spreading tools to develop hybrid applications using CSS, JavaScript, and HTML, without losing the advantages of native applications.

    If you are already a web developer, this book will provide you with the skills you need to create, customize, test, and deploy hybrid mobile applications. Starting from the beginning, this book will cover how to set up your PhoneGap development environment, add mobile web frameworks and plugins, design and customize the application layout, and utilize the embedded features of the PhoneGap framework.

    By working through the steps in each chapter, you will quickly master a variety of mobile applications with totally different approaches. You will then learn how to develop a PhoneGap plugin with native interfaces for iOS and Android, as well as common approaches to test PhoneGap applications.

    With ample screenshots that show you how to build a phenomenal application, PhoneGap by Example will ensure your success with this cutting-edge mobile development framework for hybrid applications.

    Style and approach

    An easy-to-follow guide packed with hands-on examples of real-world mobile applications. Each topic is explained sequentially in the process of creating a hybrid mobile application, and detailed explanations of the basic and advanced features of PhoneGap are included.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access PhoneGap By Example by Andrey Kovalenko in PDF and/or ePUB format, as well as other popular books in Computer Science & Hardware. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781785285318
Edition
1

PhoneGap By Example


Table of Contents

PhoneGap By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Installing and Configuring PhoneGap
Downloading and installing
Installing Node.js on Mac
Installing Node.js from the official website
Installing Node.js with Homebrew
Installing Node.js on Windows
Installing Node.js on Linux
Installing PhoneGap with NPM
Understanding PhoneGap
Basic components
Development methods
Cordova installation
Creating an application
The config.xml structure
The iOS setup
Running the application in the iOS emulator
Running the application on an iOS device
Generating the iOS developer certificate
Adding the application identifier
Registering the device
Generating a provisioning profile
The Android setup
JDK Installation
Android SDK installation
Android Studio installation
Opening the project in Android Studio
Adding an Android emulator
PhoneGap development highlights
Use a single-page application approach
Don't generate the UI on the server
Limit network access
Increase perceived speed
Use hardware acceleration
Optimize images
Optimize payload
Minimize browser reflows
Test
Selecting a UI framework
Sencha Touch
jQuery Mobile
Ionic
Ratchet
The Kendo UI
Topcoat
React
Framework7
Famo.us
The Onsen UI
Summary
2. Setting Up a Project Structure with Sencha Touch
An introduction to Sencha Touch
The installation of Sencha Touch
The installation of the Sencha Touch SDK
The installation of Sencha Cmd
Sencha Cmd features
Generating the application
Understanding the basic application structure
Getting familiar with the Sencha Touch view
Creating the Sencha Touch controller
Using store
The Sencha Touch model
The Sencha Touch store
The Sencha Touch proxy
Environment detection
Creating device profiles
Following the launch process
The UI and theming
Summary
3. Easy Work with Device – Your First PhoneGap Application "Travelly"
Installing and using GapDebug
iOS debugging setup
Computer configuration
iOS device configuration
Android debugging setup
Computer configuration
Android device configuration
The Genymotion Android emulator for faster debugging
The initial application's MVC structure
Views
Adding Pictos icons to the application
Controllers
Model and store
Using the Cordova StatusBar plugin to fix overlap
Using a camera to capture pictures
Camera plugin installation
Camera plugin usage
Creating a new picture popup
Filesystem plugin installation and usage
Using a persistent file location
Detecting the current geolocation
Saving data in local storage
Displaying data with Google Maps
Displaying picture details in a popup
Summary
4. Integrating the Travelly Application with Custom Service
Discovering the REST API
Exploring technologies to build a REST API
Understanding Node.js
Introducing MongoDB
Installing MongoDB with Homebrew
Developing a REST API
Using Express
Generating an Express application
Exploring the basic Express application
Handling URLs with routes
Returning a response
Connecting Express and MongoDB
Creating a picture model
Creating a new picture record
Editing a picture record
Deleting a record
Implementing service authentication
Implementing a login form
Handling the authentication endpoint request
Verifying authentication
Implementing authentication on the application side
Implementing file upload on the service side
Implementing file upload on the application side
Summary
5. Crazy Bubbles - Your First HTML5 Mobile Game
What game framework to choose
What is HTML5 Canvas?
An introduction to Phaser
Planning the game
Generate a Cordova application
Getting started with Phaser
Download Phaser
Get tools
Use a web server
Prepare and create the game
Preloading sprite
Displaying sprite
Handling pointer events with Phaser
Handling the pointer move event
Detect the bubble position under the pointer
Check whether a selected bubble can be moved to a new position
Swap bubbles
Releasing a bubble
Check for matches
Remove matched bubbles
Drop down bubbles above the removed bubbles
Refill the board
Calculate score
Running the application on the mobile
Summary
6. Share Your Crazy Bubbles Game Result on Social Networks
Implementing the game over screen
The vertical scenario
The horizontal scenario
Coding the logic
Implementing game restart
Sharing on Twitter, Facebook, and other social media
Sharing on Instagram
Summary
7. Building a Real-time Communication Application – Pumpidu
WebRTC fundamentals
WebRTC audio and video engines
The WebRTC protocol stack
The RTCPeerConnection API
The WebRTC browser support scorecard
What is Crosswalk and why we need it?
Adding Crosswalk support to the Cordova application
Building our first real-time communication application
Server side
Client side
Cordova application tweaks
Running the application
Building a real-time communication application with PeerJS
Server side
Client side
Running the application
Exploring other tools to bui...

Table of contents

  1. PhoneGap By Example