HTML5 SDK Overview

The QNX SDK for HTML5 (called the HTML5 SDK in this document) provides a framework for developing and executing web-compatible applications, specifically using technologies such as HTML5, CSS3, and JNext.

You install the QNX SDK for HTML5 package to develop HTML5 apps. The HTML5 SDK is based on Apache Cordova 3.6.0. Apache Cordova is a framework used to develop apps for mobile devices. The HTML5 SDK exposes the aspects of Cordova most useful for building the user interface and for building plugins to access native functionality for the QNX SDK for Apps and Media. The HTML5 SDK is necessary for you to develop apps that run on target images running QNX SDK for Apps and Media. You don't need to install the QNX SDK for Apps and Media unless you want to build a target image, or develop your own native service and expose it to HTML5.

Before you use this guide, you should be familiar with developing Cordova apps, in particular, the Platform-centered workflows. For more information about developing Cordova apps, see the Cordova documentation.

HTML5 apps and plugin development

You can write your HTML5 apps and plugins using Cordova APIs for Apps and Media. Cordova JavaScript Plugins and Webplatform APIs are provided as part of the HTML5 SDK to help you with development.

The following diagram maps the various APIs that are available to you. Use it as a roadmap to choose what to use when you develop your HTML5 app.

Figure 1. APIs available with the QNX SDK for HTML5

Typically, HTML5 and JavaScript with the provided Cordova JavaScript Plugins are sufficient for most development requirements. In some situations, however, you may find it useful to write your own custom plugin to access native functionality that the HTML5 SDK doesn't expose. If you determine that you require custom plugins to access native functionality on the platform, you have the option to use the Webplatform APIs. The Webplatform APIs are useful to access the WebView and simplify working with Persistent Publish/Subscribe (PPS) objects on the platform. In rare situations, you may also find the WebLauncher APIs useful for accessing functionality that you require.

Overview of components to develop HTML5 apps

There are several components available as part of the HTML5 SDK. You can use some or all the components for development, according to your requirements:

Apache Cordova (HTML5, JavaScript, and CSS)

Apache Cordova is a framework for application development that allows you to use web technologies such as HTML5, JavaScript and CSS to create apps for mobile devices. You can develop HTML5 apps, and with the tools provided in the HTML5 SDK, you can:

  • package an HTML5 app to deploy it to the target hardware
  • create JavaScript APIs (Cordova Plugin) to access native services on the platform
  • use webserver emulation so that your app can run without actually running a webserver on the target hardware
  • provide security features to your app

HTML5 is useful for building responsive interfaces because it allows you to modify CSS files to easily customize the look and feel of your apps. You can use various tools, such as Compass and Sass to modify your CSS. For information about Compass and Sass, see "Install CSS development tools".

HTML5 apps can use JavaScript plugins to interact with underlying services. JavaScript APIs provide interfaces to various feature components. The Netscape Plugin Application Program Interface (NPAPI) provides extensions to the HTML5 engine through a dynamically linked library. PPS, SQL, and the UI core APIs are implemented through a NPAPI interface. These APIs provide access to native DLLs that give apps access to services such as the composition manager and the launcher. If more such services are required, you can add additional plugins to extend your apps.

Cordova JavaScript Plugins and Cordova Runtime
The HTML5 SDK contains the Apache Cordova runtime, custom tools, and plugins to build apps for Apps and Media. You can also use the HTML5 SDK as an example to create custom plugins for your apps that follow the Cordova plugin specifications.
Included as part of the HTML5 SDK are Cordova JavaScript Plugins that you can use to build your apps. These plugins expose functionality that's available on Apps and Media. The version of the Cordova runtime included with the HTML5 SDK provides the development environment you need to create, build, and run HTML5 apps on Apps and Media. Webplatform (webplatform.js), an optional API included with the runtime, makes it easy to work with WebViews and PPS.
Persistent Publish/Subscribe (PPS) API
The PPS service provides a simple, filesystem-based API for client applications. PPS is used to share information between processes and apps on a target. There are various PPS objects available that you may find useful for accessing data for your HTML5 apps. For more information about PPS objects, see the Persistent Publish/Subscribe Developer's Guide and PPS Object Reference.
Node.js is a platform built on Chrome's JavaScript runtime for building fast, scalable network apps. Node.js (available from is required—you installed Node.js when you installed the HTML5 SDK. You can use Node.js to install Plugman, which is a required tool to manage plugins in your Cordova project.
Web Graphics Library (WebGL)
This graphics library is integrated into the browser engine, so you don't need to download and install any binaries to use it. Based on OpenGL ES 2.0, WebGL is a cross-platform JavaScript API. As a Document Object Model (DOM) API, it runs in the HTML5 canvas element to render interactive 3D graphics in compatible browsers.