General Interface Builder uses dynamic class loading for increased performance and accelerated load time. Dynamic class loading causes classes to be loaded as they're needed at the last possible moment. Since only statically loaded classes are loaded at application startup, the application loads much faster.
The classes distributed with General Interface are partitioned into two categories:
For a list of statically loaded system classes, see General Interface Framework Classes.
As a General Interface application loads, General Interface Framework statically loads a subset of the system classes. Next, application classes and application code using the Auto Load option are statically loaded. Finally, all other classes are loaded using the dynamic class loading mechanism. The following table provides an overview of how classes are loaded.
The General Interface runtime system, General Interface Framework, always statically loads the classes listed in the following table as the application initializes.
All other system classes, such as Matrix, must be loaded dynamically using the require() method or through deserialization. See jsx3.require() Method.
To dynamically load custom application classes when the Auto Load option is off, classes must meet the following requirements:
If you don't want the application code statically loaded, you can load it dynamically using the Server.loadResource() method. This method looks up a resource registered with the application by its id. The resource must be registered in the config.xml file of the application. For more information, see General Interface API Reference.
The jsx3.require() method can be used to load classes explicitly. Use the fully qualified class name when using the jsx3.require() method. For example,
Only classes that can be found by the system class loader are loaded. Custom classes can be added on the Classpath panel of the Project Settings dialog. See Specifying Class Paths.
The jsx3.require() method must be called at least once before making these types of references:
If you've created custom classes, you need to specify the class paths, so the system class loader can find the classes. Class paths are set on the Classpath panel of the Project Settings dialog. Class paths are saved as settings in the application configuration file, config.xml, and are deployed with the project.
For specifics on setting class paths, see Classpath Panel.
The following file and directory naming conventions for classes are required only for dynamic class loading. For classes that aren't dynamically loaded, these naming conventions are a recommendation only.