Using the AppCache.Load method to run applications

Applications are normally started when a user selects a tile in the Neptune launchpad. Applications can also be started in a range of other scenarios, for example, an application can be started just by running the direct URL.

If you only need to run one application, Neptune recommend running the application inside the Neptune launchpad. You can set the launchpad to only run this one application. By doing this, you still get the benefit of the launchpad framework.

Another way to start an application is by code using the AppCache.Load method. By doing this in the Neptune launchpad, you can take advantage of all the launchpad events. You can also run applications inside another application in a parent frame, making your Neptune applications reusable in a wide range of scenarios.

When an application is started using AppCache.Load, the onInit, and onBeforeDisplay event handlers are called, though not in the same way in all the different loading scenarios.

The following matrix provides an overview of the different loading scenarios to consider when using the AppCache.Load method.

Scenario

Code

First call

Subsequent calls

Selecting navigation item

From tile selection

onInit,
onbeforeDisplay

onbeforeDisplay

onbeforeDisplay

Standalone without onInit

AppCache.Load("APP");

onInit,
onbeforeDisplay

onbeforeDisplay

Standalone with onInit,
first call

AppCache.Load("APP", \{
    load: "init"
});

onInit

Standalone with onInit  
subsequent calls

AppCache.Load("APP");

onbeforeDisplay

onbeforeDisplay

In parent

AppCache.Load("APP", \{
    parentObject: panel
});

onInit,
onbeforeDisplay

onbeforeDisplay

With navigation item

AppCache.Load("APP", \{
    load: "nav"
});

onInit,
onbeforeDisplay

onbeforeDisplay

In dialog

AppCache.Load("APP", \{
    dialogShow: true
});

onInit,
onbeforeDisplay

Single app in launchpad

onInit,
onbeforeDisplay

App in tile group

onInit,
onbeforeDisplay

App in tile

onInit,
onbeforeDisplay