Application Startup
Some details about the initialization of a qooxdoo application.
Loading phase
- Load HTML
- Load the JavaScript files
Before the load event is triggered
- Merge user settings from previously defined qx.Settings.
- Load qooxdoo core (OO, Array, String, validation, Object, ...)
- Load Logging module
- Instantiate qx.Init
- attach event handler to
onload,onbeforeunloadandununload
qx.core.Init.getInstance().setApplication(my.namespace.Application);
Inside the onload event handler
qx.Init._onload:
- looks up the default application component from the settings. The default is qx.component.init.InterfaceInitComponent.
- delegates initialization of the framework to the application component
InterfaceInitComponent starts the three loading phases:
- initialize
- main
- finalize
Initialization phase
- Instantiate qx.ui.core.ClientDocument. ClientDocument is the basic widget of all qooxdoo applications. It is the parent of all children inside your application. It also handles their resizing and focus navigation.
- Instantiate qx.event.handler.EventHandler. The event handler themselves get not yet attached.
- Call
initializeof the user defined applications class
Main Phase
- Call
mainof the user defined applications class. - Start preloading of images
Finalization Phase
This phase is started after the image preloader system has finished loading.
- Flush global queues. This creates the DOM nodes of the widgets and applies styling.
- Global event handler for mouse, key and focus events are registered.
- Call
finalizeof the user defined applications class.
Loading phase
- Load HTML
- Load qooxdoo.js file
- Merge user settings from previously defined QxSettings.
- Load the debug console
- Create an application instance
- Application Initialization (will be started on the “load” event of the window)
Initialization phase
- Print version and build information
- Output available classes
- Output client informations
- Application starts objects “pre” method (which can be defined through the qooxdoo application developer)
- Application fires “pre” event
- Create an instance of QxClientWindow
- Registering unload event to dispose application before leaving the document.
- Create an instance of QxClientDocument and assigning “document” element
- Create an instance of QxFocusManager to handle the focus handling inside the client document, which behaves like a typical focus root.
- Create an instance of QxEventManager and assign events to this instance.
- Remapping methods from QxParent to QxApplication so that the application behaves like the client document in some aspects (add or remove children, ...)
Main phase
- Application starts objects “main” method (which can be defined through the qooxdoo application developer)
- Application fires “main” event
Preload phase
- Wait for initially visible images to load
Widget phase
- Application starts QxWidget queue flush
- Create DOM elements and assign styles, attributes and events
- Layout children using layout implementation of each parent
- Flush of display queue. Add created DOM elements to the tree in a heavily optimized way.
Post phase
- Application initializes “post” handling
- Application starts objects “post” method (which can be defined through the qooxdoo application developer)
- Application fires “post” event
Postload phase
- Loading of initially invisible images
