Developer_release_1.4.0
Struct app.application_specification
The Application Specification is a special table, which describes various aspects of the Application.
General form
In general form, by convention, each sub-table is defined in a separate file and required into the final table. All the files are placed in a separate directory. Specification script must be namedinit.lua
.
return { format = 'mpa1000-1.0.0'; id = 'com.example.acme.telegram_bot'; version = '1.0.2'; metadata = require 'metadata'; handlers = require 'handlers'; backoffice = { forms = require 'forms'; }; }
Short Form
Small Applications may not follow the general form convention and place all declarations in one file.return { format = 'mpa1000-1.0.0'; id = 'com.example.acme.telegram_bot'; version = '1.0.2'; handlers = { cron = { { cron = '* * * * *'; handler = function() -- handler code end; }; }; ['EventName'] = function(...) -- handler code end; } }
Properties
backoffice | (app.spec_backoffice) Backoffice related things. |
format | (string) Specification Format Identifier String. |
handlers | (app.spec_handlers) Handlers definitions. |
id | (string) The application identifier string is used to differentiate the Applications on the Board and in the Application Repository. |
metadata | (app.spec_metadata) Information about the Application. |
version | (string) Version of the Application. |
Properties
- backoffice
- (app.spec_backoffice) Backoffice related things.
- format
-
(string) Specification Format Identifier String.
Designed to identify the Application specification structure used.
The specification format may change over time. Using the specification format
identifier string will eliminate many backward compatibility issues when the
format needs to be modified.
Format:product-major.minor.build
Example:format = 'mpa1000-1.0.0'
- handlers
- (app.spec_handlers) Handlers definitions. Handlers are entry points to Applications.
- id
-
(string) The application identifier string is used to differentiate the
Applications on the Board and in the Application Repository. Assigning
identifiers to objects is an industry convention solution to identify
objects.
Format:company-domain-name.application-name
Example:id = 'com.example.acme.telegram_bot'
- metadata
- (app.spec_metadata) Information about the Application. Used to provide End-Users and OEM Developers with additional information about the Application, the optional metadata table is to be available within the script specification. Also it has some Scheduler options related to the Application. The metadata table is made by analogy with the LuaRocks rock specification metadata block.
- version
-
(string) Version of the Application.
The version string is used in various cases:
- Application release management;
- the End-User needs to know the Application version, e.g., to check if he uses the latest version of the Application;
- to differentiate Application versions in the Application Repository;
- to minimize backward compatibility issues when the Application configuration structure has been changed.
Format:major.minor.patch
Example:version = '1.0.2'