When you build an application, the compiler uses the project's compiler search paths along with the component library search paths to determine where to look for units (*.wbs) and control interface files (*.wbi). Please see the Modifying Project Options and Modifying IDE Settings topics for more information on modifying these search paths.
The process of loading and executing an application depends upon whether the application is a visual client application, a non-visual client application, or a server application.
A client application is typically loaded in a web browser via a URL that includes the HTML loader file for the application. Once the loader file is loaded in the web browser, the following steps occur:
Any control interfaces are loaded from the special tags in the HTML loader file.
For visual client applications, any forms and databases that are designated to be automatically created during application startup are created. During creation, the associated form and database files (*.wbf) are loaded from the special tags in the HTML loader file. Please see the Modifying Project Options topic for more information on designating forms and databases for automatic creation during application startup.
Client applications are designed to be loaded and then stay loaded until the browser navigates away from the URL that loaded the application. They are not "page-oriented" like many web applications or general web sites.
Server ApplicationsFor server applications, the compiler compiles the application source code (Object Pascal variant) into an application file that can be executed by the web server. During the compilation of a server application, the compiler emits a single .wba application file.
The application file contains all of the application source files and any referenced source files, including request handler/database files (*.wbf), in a compressed format.
A server application is loaded by the web server when an incoming web server request is routed to a server application resource that matches the application name assigned to the server application when the application was installed. Once the server application is loaded, the following steps occur:
The web server loads the .wba application file, uncompresses the source files, and compiles the source code.
The web server initializes the application and starts execution.
Any request handlers and databases that are designated to be automatically created during application startup are created. During creation, the associated request handler and database files (*.wbf) are loaded from the application file. Please see the Modifying Project Options topic for more information on designating request handlers and databases for automatic creation during application startup.
The incoming web server request is passed into the application's main request handler, where the application can handle the request and send a response to the request.
After the application execution completes, the web server will finalize the application.