Documentation

JavaScript client apps run within a browser or web view, either on a desktop or mobile device. To develop client apps, your development environment must meet the following minimum system requirements:

Type of appRequirement
JavaScript-only client apps
  • Windows or Mac OS X
  • Java JDK 7
  • Any standard text editor or JavaScript IDE

To configure a JavaScript development environment to use Akula, add the Akula JS library files to your project.

JavaScript versions of the Akula persistence and sync features require a plugin that is specific to each environment. As a result, to use sync or persistence in a JavaScript-based app, you must use Cordova. For more information, see Configuring a Cordova Development Environment.

To configure the JavaScript development environment:

  1. Locate the /javascript-sdk/lib directory in the location where you installed Akula. If you have not done so already, download Akula from the Downloads page (you must log in to access this page).
  2. Copy the Akula JavaScript library file and all dependent libraries to a directory that is accessible to your app. 

    The specific files you must copy into your project are:
    • akula.js
    • underscore-min.js
    • >cryptojs-core-min.js
    • cryptojs-sha512-min.js
    • json2-min.js
    • jquery-1.8.2-min.js
       
    Note

    Many of the Akula JavaScript files include minified versions. They share the same name as the non-minified version, with the exception of having "-min" at the end of the filename. For example, "akula-min.js" is the minified version of "akula.js".

    Minified JavaScript files are optimized. Use the non-minified version when developing applications, and the minified version when deploying applications.

  3. Add the Akula JavaScript library and its dependent libraries to your app by adding the following lines:

    You can modify the paths as necessary, based on where you copy the library files to in your project. 

    Note

    The order of JS files that are loaded by your Cordova project is important. You must adhere to the following rules:

    • underscore-min.js must appear before the cryptojs files.
    • akula.js must appear after the other JS files.