Application Life Cycle

Each Geocortex HTML5 viewer is based around an Application object that consumes a configuration file and then presents the application as it was configured by an administrator or developer.

Unlike typical JavaScript web applications, Geocortex HTML5 applications are designed to take up entire pages, be embedded in existing pages, or live side-by-side with other Geocortex HTML5 applications. Applications can be hosted entirely inside of a single HTML element, and are designed to offer interoperability and the ability to embed into any existing web application.

Application instances are created by either passing a configuration URI string or configuration object into the constructor. A call to the application’s initialization method starts the loading process. If a URI was passed into the constructor, the URI is fetched and the configuration JSON is parsed. If a configuration object was passed, it will be consumed.

The application consumes configuration materials and begins downloading any libraries that are specified within the configuration. When a library has been downloaded, any modules that are associated with the library are loaded, along with any views and view models that are configured for that module. The next library is then be downloaded and the process is repeated.

After an application has completed initializing itself, it fires an initialization callback.

An application may be interactive before being considered fully initialized.

When you are finished with an application, or wish to otherwise terminate it, call the shutdown method of the application. Shutting down an application destroys all regions and views, disposes of bindings and event handlers, and leaves the page in the same state as before the application ran.

© 2018 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 4.9