This section describes the process of launching a Nexacro app.
bootstrap
Bootstrap refers to the process of verifying related information and fetching necessary resources to load an application.
WRE | NRE | |
---|---|---|
1 | index.html | start.json start_android.json start_ios.json |
2 | get bootstrap info | |
3 | update engine | |
4 | update resource (data) | |
5 | load framework files | |
6 | load component modules | |
7 | load Application |
In general parlance, bootstrapping usually refers to a self-starting process that is supposed to proceed without external input. In computer technology the term (usually shortened to booting) usually refers to the process of loading the basic software into the memory of a computer.
https://en.wikipedia.org/wiki/Bootstrapping
In relation to Nexacro, bootstrap means a preparatory process for launching an app.
Application Loading
The process of loading the form connected to Application to run the app is as follows.
Loading sequence | Event occurence | |
---|---|---|
1 | Loading the environment file | |
2 | Selecting a screen (when there are more than one screen) | |
3 | Loading the information on the screen | |
- Checking Apps that use the ID of the selected screen as a value of the screenid property. | ||
- Creating Application objects | ||
4 | Processing the environment file (TypeDefinition, properties, Variables) | |
Environment.onload | ||
5 | Loading the theme file (css, map.js file) | |
6 | Loading the Initvalue file | |
7 | Loading the Application (*.xadl.js file) | |
- Setting the properties of the Application | ||
Application.onloadingappvariables | ||
- Creating and initializing a MainFrame | ||
MainFrame.onactivate | ||
- Creating and initializing Frames | ||
ChildFrame.onactivate | ||
Application.onload | ||
8 | Loading Forms (*.xfdl.js files) | |
Form.oninit | ||
Form.onload | ||
Form.onactivate | ||
Application.onloadforms |
Because of the loading sequence, you cannot use objects that are not loaded yet.
For example, if you access AppVariables within the event handler of the Environment.onload event, "undefined" will be returned.
this.Environment_onload = function(obj:nexacro.Environment,e:nexacro.LoadEventInfo) { trace(nexacro.getApplication().all['Variable0']); //undefined }
Form Loading
The below sequence is the elaboration of the process between 12. Loading Forms and 20. Event occurrence: Form.onload
, as in the above Application Loading.
Loading a Form
Executing the Form
Downloading and executing sub-files
Initializing the Form
Setting style properties of the Form
Setting non-style properties of the Form
Creating objects, components and BindItems
Performing scripts that are processed inside the engine
Registering event handlers
Calling the methods of the objects and components:
Object.createComponent
Event occurrence:
Form.oninit
Method calling:
Form.on_created
Calling the methods of the objects and components:
Object.on_created
Loading images and processing transactions
Event occurrence:
Form.onload
A subfile refers to a file that is connected through the include directive. (eg. a script file)
The objects and components included in a Form are created according to the specified Z-order.
The loading times for Div and Tab components may vary according to network speeds if those components are designed to load Forms connected through the url property.