Table Of Contents

Application Packaging Standard

Last updated 18-Mar-2019

JS Modules

The APS JS SDK provides a set of modules for creating and controlling various visual interface elements of web applications:

  • aps/Memory and aps/Store are used to store data and synchronize them with the APS controller database.
  • The other modules define widgets and display them in control panels.

In your application, you can declare a widget using one of the ways:

Regardless of a selected declaration way, all widgets must be located within the root container aps/PageContainer in accordance with the following rules:

  • Every widget is implemented by its own module in the aps namespace.
  • In an HTML page, the main widget aps/PageContainer layouts the page. It defines messages, screen captions, and other.
  • Every widget can be bound with a model using the watch and/or dojox/mvc/at method.

To verify which version of control panel is active, use the has(aps-bs) method (‘aps-bs’ stands for ‘APS bootstrap’). It returns true if “CCP v2” is used. The following example illustrates how to create the Tiles container if CCP v2 is used:

if(has('aps-bs'))
   new Tiles({ ... });  // If CCP v2, then use aps/Tiles