Index

Communicator

This npm module serves as an abstraction for communications with the server

Adding it to a browserify project

npm install frontend-communicator --save

Alternatively the build can be downloaded here

Installing

npm install

Running tests

npm test

Running build

npm run build

To read more on the build setup, please refer to the build documentation.

Npm scripts

The project comes with a couple npm scripts that can be executed by running

npm run <script>

So,

npm run build

for example. For all npm scripts available please see npm scripts

Concepts

Adapter

Adapters serve to do the actual transport of data. Adapters are used by Connections to execute Requests.

Connection

Connections serve to represent a connection to a server, it uses an Adapter to do it's transport of data.

Request

Requests are blueprints for executing a request to a server, they can execute themselves using their own Connection, or execute themselves on another Connection.

Walkthrough

For more information, please read the walkthrough, for even more information please refer to the documented Namespaces and Classes.

TODOs

  • Add an upload method to the Adapter spec, add an upload method to Connection and add an upload flag to Request
  • Allow cache lifetime to be configured on Request and Connection level, where Request has precedence
Rik Hoffbauer 2015
Documentation generated by JSDoc 3.4.0 on 2015-12-01T13:53:50+01:00