The integrated App Manager relies on app.json
files to manage and run IMatch Apps.
app.json
Each app must include an app.json file. The AppWizard in IMatch automatically creates this file when you create a new app.
app.json files are standard JSON text files in UTF-8 encoding. There are mandatory and optional elements. app.json supports localization of apps via language-specific strings.
Example
The following example shows the app.json for the IMatch AppWizard.
{
"type" : "app",
"id": "photools.com.IMatch.AppWizard",
"index": 1,
"version" : "1.0",
"author": ["Mario M. Westphal & photools.com"],
"name": {
"en": "IMatch AppWizard",
"de": "IMatch AppWizard"
},
"description": {
"en": "Use the IMatch AppWizard to create new apps quickly and easily.",
"de": "Verwenden Sie den IMatch AppWizard, um neue Apps schnell und einfach zu erstellen."
},
"defaultDocument": "index.html",
"icon" : {
"" : "im-appwiz-icon.png"
},
"runAs": "modal",
"windowSizing" : {
"sizing" : "both",
"width": 700,
"height" : 650
}
}
Elements
The following table describes each element in an app.json file. The file must be valid JSON, element names are case-sensitive.
Element | Mandatory | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
A unique id for this app. Only alphanumerical characters are allowed. It is recommended to use a GUID for this. But every unique string will do. Use your name and the name of your app for exampple: photools.com-MyCoolApp . Or use one
of the many free web-based GUID generators, like www.guidgen.com/.The IMatch AppWizard automatically generates a GUID for new apps. |
|||||||||||||||||||||||||||||||||||||||||||||||||
version |
The version of the app. If no version is specified, 1.0 is assumed. | |||||||||||||||||||||||||||||||||||||||||||||||||
hidden |
Boolean. If this value is specified and true, the app is hidden from the App Manager and the drop-down list in App Panels. | |||||||||||||||||||||||||||||||||||||||||||||||||
index |
This integer number can be used to control the native sort order for apps in the AppManager. Default is 0. The App Manager sorts apps by this index and their name. The user can later re-arrange apps to whatever order he prefers. |
|||||||||||||||||||||||||||||||||||||||||||||||||
type |
Describes the type of the app. The following values are supported:
|
|||||||||||||||||||||||||||||||||||||||||||||||||
supportsDrop |
For Import/Export apps only. If this is true, the app can handle dropped objects. See Import and Export Apps for more information. |
|||||||||||||||||||||||||||||||||||||||||||||||||
defaultDocument |
The name of the html file to load when this app is started. If this is not specified, the App Manager checks for index.html ,
index.htm , default.html and default.htm . If none of these
documents is found, the app is not loaded and an error is written to the application log file. |
|||||||||||||||||||||||||||||||||||||||||||||||||
author |
String or array of strings with the names of the script authors. This information is displayed in the AppManager panel. | |||||||||||||||||||||||||||||||||||||||||||||||||
title |
An object with language-specific titles for the app. The title is used in the AppManager
Panel. Tip: Use a short, one-word title for your app so it fits on-screen in the smaller icon modes. |
|||||||||||||||||||||||||||||||||||||||||||||||||
name |
An object with language-specific names for the app. The name is displayed in the AppManager Panel
**if no title is available**. The format is "lang" : "value" where lang is either "" for the neutral language or a
standard ISO language code like "en" or "de".When running an app, IMatch checks for the app name in the same language used for the IMatch user interface. If no match is found, IMatch falls back to the neutral "" language or "en" if no neutral language name exists. Example:
|
|||||||||||||||||||||||||||||||||||||||||||||||||
description |
A description for this app. This description is displayed in the AppManager Panel. Supports
language-specific descriptions in the same format as name . |
|||||||||||||||||||||||||||||||||||||||||||||||||
icon |
An optional icon in PNG format. Recommended size is at least 256x256 pixels. Transparencies are
supported. IMatch displays this icon in the App Manager and various other controls. If no icon is specified, a stock icon is used. Icons can be language-specific, using the same format as name . |
|||||||||||||||||||||||||||||||||||||||||||||||||
runAs |
This option controls how the app is run by the App Manager. Supported values are:
|
|||||||||||||||||||||||||||||||||||||||||||||||||
windowSizing |
Mandatory for model apps. This is an object with the following elements:
|
|||||||||||||||||||||||||||||||||||||||||||||||||
allowRefresh |
Version 2017.6.8
If this option is specified as true , pressing F5 in an app no longer
causes a refresh/reload.This option can be used to prevent the user from accidentally reloading an app. |
|||||||||||||||||||||||||||||||||||||||||||||||||
handleF1 |
Version 2020.3.6
By default, IMatch handles the F1 key automatically and opens the help system when the user presses this key. If your app has a custom handling for F1 and you don't want IMatch to handle F1 while the app is focused in an App Panel, set this to true. |
|||||||||||||||||||||||||||||||||||||||||||||||||
modalAllowClose |
For modal apps only. Version 2017.6.8 By default, IMatch allows the user to close modal apps at any time using the X button in the caption bar or the Alt + F4 keyboard shortcut. If this option is specified as true , IMatch displays a message box, asking the user to
confirm closing the app.This option should be used if it is problematic for an app to be closed in mid-run. It has no effect on the IMatch.modalClose function. |
|||||||||||||||||||||||||||||||||||||||||||||||||
modalNoClose |
For modal apps only. Version 2021 If this option is set to true, the Close command in the system menu, the [X] button in the caption and the Alt+F4 keyboard shortcuts are disabled. This option should be used very carefully, because if the app fails to provide a way to close the modal, the user will be stuck. This has no effect on IMatch.modalClose function. |
|||||||||||||||||||||||||||||||||||||||||||||||||
ignoreChanges |
IMatch monitors the app folders for changes and automatically reloads apps when you make changes
to them in your editing environment. However, if your app manipulates files in its own folder (e.g., configuration or data files), this can interfere with you using the app. Because IMatch reloads the app every time your app makes changes to the file system inside the app folder. To prevent this, use this member to specify an array or folder / file name patterns to ignore. Example:Ignore all changes in the data folder inside the app's folder:
|
|||||||||||||||||||||||||||||||||||||||||||||||||
linkPoints |
Version 2019 Link points allow you to link (display) your app in IMatch menus and toolbars. This makes it easier for the user to run your app. App can be included in multiple menus/toolbars by specifying multiple link points. Supported Link PointsThe following link point types are supported:
Syntax
This causes IMatch to link the app in both the Database menu and all File Window Context menues The IMatch starts apps from menus and the toolbar as if they were started from the App Manager. This means the app is either loaded into an App Panel or runs as a modal app. |
Modal or Normal Apps?
Normal apps run in an App Panel. As soon as a user loads a normal app into an App Panel, it becomes active and needs to display 'something'. It can also monitor IMatch and IMWS messages and react.
A modal app opens in a separate window and blocks the IMatch user interface. Very similar to a dialog box. This type of app is ideal for apps which do some sort of 'processing' or which need to display a dialog to which the user has to respond before the app an continue.
Responsive Design
You should always design your apps to be responsive. This means that your app automatically adapts to
different screen sizes, App Panel or modal app window sizes.
CSS frameworks like Bootstrap or similar help you with that. The IMatch AppWizard by default includes the Bootstrap CSS library for a responsive design.
Use fixed-size modal app windows only for very specific purposes.