JavaScript Mobile Application Development

Book description

Create neat cross-platform mobile apps using Apache Cordova and jQuery mobile

In Detail

Whether you are developing a mobile app for iPad or on a Windows Phone, you need to learn the specific languages and technologies for that device. This is where Apache Cordova shines.

This book is the learning resource to use when you want to efficiently develop your own mobile applications using Apache Cordova as the platform for your HTML, CSS, and JavaScript. In order to develop good-looking mobile applications, this book also utilizes jQuery Mobile. jQuery Mobile is one of the best available frameworks for developing mobile-friendly web applications.

After finishing this book, you should be able to develop your very own mobile application on different mobile platforms using only JavaScript, without having to learn the native programming languages of every mobile platform.

What You Will Learn

  • Develop, build, run, and deploy great cross-platform mobile applications using Apache Cordova
  • Create complete mobile apps using Apache Cordova that run on Apple iOS, Google Android, and Windows Phone
  • Access the device's native functions by utilizing the Apache Cordova APIs
  • Create a neat user interface for your mobile application using jQuery Mobile
  • Increase the quality and robustness of your mobile applications by developing unit tests for their logic
  • Design, develop, and automate tests for your mobile application using Jasmine, Karma, and Jenkins CI
  • Extend the power of Apache Cordova by creating your own Apache Cordova cross-platform mobile plugins
  • Explore some of the differences between the mobile platforms and learn how to handle these differences in a maintainable way

Table of contents

  1. JavaScript Mobile Application Development
    1. Table of Contents
    2. JavaScript Mobile Application Development
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. An Introduction to Apache Cordova
      1. What is Apache Cordova?
      2. The differences between mobile web, hybrid mobile, and native mobile applications
      3. Why you should use Cordova
      4. Cordova architecture
      5. Overview of Cordova APIs
      6. Summary
    9. 2. Developing Your First Cordova Application
      1. An introduction to Cordova CLI
        1. Installing Apache Cordova
        2. Generating our Sound Recorder's initial code
          1. The Sound Recorder's initial structure
          2. An insight into the www files
      2. Developing Sound Recorder application
        1. Sound Recorder functionality
        2. Sound Recorder preparation
        3. Sound Recorder details
        4. Recording and playing the audio files back
      3. Building and running Sound Recorder application
      4. Summary
    10. 3. Apache Cordova Development Tools
      1. Configuring Android development environment
        1. Extending your existing Eclipse IDE
        2. Creating an Android Virtual Device
        3. Importing the Sound Recorder application in to Eclipse
        4. Running the Sound Recorder application on a real Android device
      2. Configuring iOS development environment
        1. Importing the Sound Recorder application into Xcode
        2. Running the Sound Recorder application on a real iOS device
      3. Configuring the Windows Phone development environment
        1. Importing the Sound Recorder application into Visual Studio
        2. Running the Sound Recorder application on a real Windows Phone
      4. Summary
    11. 4. Cordova API in Action
      1. Exploring the Cordova Exhibition app
      2. The Cordova Exhibition app structure
      3. Accelerometer
        1. Demo
        2. The HTML page
        3. View controller
        4. API
      4. Camera
        1. Demo
        2. The HTML page
        3. View controller
        4. API
      5. Compass
        1. Demo
        2. The HTML page
        3. View controller
        4. API
      6. Connection
        1. Demo
        2. The HTML page
        3. View controller
        4. API
      7. Contacts
        1. Demo
        2. The HTML page
        3. View controller
        4. API
      8. Device
        1. Demo
        2. The HTML page
        3. View controller
        4. API
      9. Geolocation
        1. Demo
        2. The HTML page
        3. View controller
        4. API
      10. Globalization
        1. Demo
        2. The HTML page
        3. View controller
        4. API
      11. InAppBrowser
        1. Demo
        2. The HTML page
        3. View controller
        4. API
      12. Summary
    12. 5. Diving Deeper into the Cordova API
      1. Media, file, and capture
        1. Demo
        2. The HTML page
        3. View controller
        4. API
      2. Notification
        1. Demo
        2. The HTML page
        3. View controller
        4. API
      3. Storage
        1. Demo
        2. The HTML page
        3. View controller
        4. API
      4. Finalizing the Cordova Exhibition app
      5. Cordova events
      6. Summary
    13. 6. Developing Custom Cordova Plugins
      1. Developing a custom Cordova plugin
        1. Using plugman
        2. Plugin definition
        3. Defining the plugin's JavaScript interface
      2. Developing Android code
      3. Developing iOS code
      4. Developing Windows Phone 8 code
      5. Publishing our plugin to Cordova Registry
      6. Testing our Cordova plugin
      7. Summary
    14. 7. Unit Testing the Cordova App's Logic
      1. What is Jasmine
      2. Configuring Jasmine
      3. Writing your first Jasmine test
      4. Jasmine Matchers
      5. Jasmine in action – developing Cordova app tests
        1. An overview of the weather application
        2. Developing synchronous code tests
        3. Developing asynchronous code tests
        4. Manually executing tests
      6. Automating tests using Karma
        1. Installing Karma
        2. Karma configuration
        3. Running tests (on mobile devices)
        4. Generating XML JUnit and code coverage reports
        5. Integrating tests with the CI tools
      7. Summary
    15. 8. Applying it All – the Mega App
      1. Mega App specification/wireframes
      2. Preparing for the Mega App
      3. The Mega App architecture
      4. The Mega App model and API
      5. The Mega App user interface
      6. Finalizing Mega App
      7. Deploying and running Mega App
      8. Start contributing to Mega App
      9. Summary
    16. Index

Product information

  • Title: JavaScript Mobile Application Development
  • Author(s): Hazem Saleh
  • Release date: October 2014
  • Publisher(s): Packt Publishing
  • ISBN: 9781783554171