1. Introduction

This document explains how to use the JavaScript client for AMPS. Use this document to learn how to install, configure and develop applications using the AMPS JavaScript Client API.

Prerequisites

Before reading this book, it is important to have a good understanding of the following topics:

  • Developing in JavaScript. To be successful using this guide, you will need to possess a working knowledge of the JavaScript language. Visit https://developer.mozilla.org/en-US/docs/Learn/JavaScript for resources on learning JavaScript.
  • AMPS concepts. Before reading this book, you will need to understand the basic concepts of AMPS, such as topics, subscriptions, messages, and SOW. Consult the AMPS Users’ Guide to learn more about these topics before proceeding.
  • An installed browser or Node.js runtime. The AMPS JavaScript Client currently supports most JavaScript environments.

You will need an installed and running AMPS server to use the product as well. You can write and compile programs that use AMPS without a running server, but you will get the most out of this guide by running the programs against a working server.

The AMPS clients support a variety of operating systems and programming languages to meet the needs of a variety of applications. This client support matrix is a quick reference to help you understand the needs of different clients and what those clients support.

JavaScript Support

The AMPS JavaScript client supports both Browser and Node.js as well as their derivatives, such as Electron, and OpenFin. The supported environments are the following:

  • Node.js 0.12.1 or higher;
  • Microsoft Internet Explorer 11;
  • Microsoft Edge 12 or higher;
  • Google Chrome 16 or higher;
  • Mozilla Firefox 11 or higher;
  • Apple Safari 6.1 (iOS 6.0) or higher;
  • Apple iOS Safari 7 or higher;
  • Google Android Browser 4.4 (Android KitKat) or higher;
  • Opera 12.1 or higher.

The JavaScript client supports all API features.