May 16, 2017

OpenFin Application Config – Best Practices

Your OpenFin Application Config (or manifest) file provides settings that you should be using for improved security, support and branding. The configuration file is a server-hosted JSON file (ex. ‘app.json’) that is low-risk to modify.

In this blog we cover some of the basic, yet important, application config settings that you should be using.

Application Startup

The OpenFin RVM (Runtime Version Manager) utilizes the application config to define its rules for starting up an OpenFin application. It identifies your app’s web `url` to start and run your application on OpenFin. It leverages the `runtime` argument to define which OpenFin version to run your application in. It reads the `assetsUrl` to determine where the application’s assets reside and retrieve them from. And so on…

Easy, Low Risk
As mentioned, the application config is simply a JSON file. Your application config can easily be updated and saved with limited effort and your web app is now leveraging its new configuration parameter(s). Updates to the config can be considered low risk because they have limited impact to your overall application behavior. Changes can be done on the fly and are applied on the next start of the app.

Feature Highlights
Here are a few of the application configuration parameters we recommend you utilize in your OpenFin application:

startup_app
Determines app Name, app URL, default window size, show context menu and many other startup related configurations

This object is important for how the application will first appear and behave to the end user.

{code}

licenseKey
Determines Community or Enterprise license

Enterprise or Community Licenses are available to application providers. Here is a snippet:

{code}

assetsUrl
Determines location for applications assets

This parameter indicates to OpenFin RVM where to download the applications assets (new runtimes or RVM’s). It is generally used when application providers prefer to host their own assets in place of OpenFin. This feature is only available with an Enterprise License.

{code}

contentNavigation
Determines a “whitelist” of approved domains where content can be loaded from into your app

This setting limits which domains your application can load content from. This gives extra protection against loading assets from external or unapproved domains. Here is a snippet:

{code}

supportInformation
Customize error messages and collect logs when a deployment issue is encountered

Application providers should override the default OpenFin settings with their Company Name, Support Email and ability to directly collect and pass along log files. This setting ensures that you can manage the relationship between you and your end users when deployment issues arise. Here is a snippet:

{code}

OpenFin sample error message with supportInformation

runtime
Determines the OpenFin Version to start your web app in, including any command line arguments

Determines and controls which OpenFin version to use when starting your application in OpenFin. A fallback and future version can also be managed in this object. They are helpful for managing the deployment of an OpenFin upgrade. Additionally, any Chromium command line arguments needed in your application are managed here and passed in on launch of OpenFin. For Community License users, the version must be set to “community” with “forceLatest” set to true.

{code}

dialogSettings
Determines the customization and branding of the OpenFin download progress bar

This parameter is very useful to ensure a consistent branding with your application.

{code}

OpenFin download progress bar

splashScreenImage
Determines an image and/or logo to display on application startup

This parameter is useful to applications with a slow start up time. It provides some level of “loading” to the end-user.

{code}

OpenFin splashScreenImage

shortcut
Parameters for customizing your application shortcut and auto-start

This parameter allows you to set your application to auto-start, as well as customize the folder location and icon for your application shortcuts.

{code}

offlineAccess
Determines whether your application is to be run offline

This parameter is useful for applications that intend to be run while not connected to the internet.

{code}

An application config supports many more parameters, including a long list of chromium switches. OpenFin recommends the above set for all production deployed applications.

Enjoyed this post?

Share this post

Related Posts

All Posts ->

Implementing FDC3 standards on OpenFin!

The ultimate goal of the FDC3 project is to enable a user experience on the financial desktop on par with what we enjoy on mobile devices.

Tutorial