Running as Applet
The Application Controller is a ULC application that allows ULC application server executables to be started and stopped on the machine that it is running on. In addition it can send a request to the UI Engine to which it is connected, to request a connection to be established to any of these running ULC server applications.
NOTE: The description and screen shots below refer to the ULC Java Application Controller but the principle remains the same for the ULC Smalltalk Application Controller, though the user interface is slightly different.
Figure 1: Application Controller Overview
The ULC UIEngine can handle more than one connection at the same time. These connections can be established passively whereby the Engine waits in server mode for applications to connect. The reverse is supported as well, i.e., connections can be established actively by the Engine. In client mode, the Engine calls out to a given URL address. A URL can be specified in a command line argument when the UIEngine is started. However, it is also possible to make the Engine connect to an application server by sending it a request
(containing the application's URL) programmatically via a ULC connection. The Application Controller sample application exploits this feature.
Similar to a desktop, the Application Controller presents a number of applications visually in a window (see Figure 2).
Figure 2: Application Controller in default Mode
Double clicking on an application's representation (or selecting the application and clicking the 'Connect' button) makes the UIEngine connect to that application's server. Connections can be closed again by selecting an application and clicking the 'Disconnect' button. When a connection to an application's server can be established the corresponding visual representation indicates this by turning the red icon to green. Connections can also be pending, i.e. started in the UIEngine but not yet established because the server is not responding. Pending connections are indicated by a yellow icon.
The Application Controller is started with the following steps:
Start the application in server mode
serverhost bring up a DOS prompt in folder
Release\Java\Applications\AppController. Start AppController on the selected port (here: 2222) by entering:
run -server 2222
Note: 2222 is the default port for the AppController. The Experimental Java-Plug-In pages expect the AppController to be running on this port.
Start the UIEngine in client mode
clienthost bring up a DOS prompt in folder
Release\UIEngine\bin. Start the engine with the Swing widget set and
make it connect to the server by entering:
ulcui -url ulc://serverhost:2222
In the described default mode the Application Controller provides an easy to use interface to start and stop the presentation halves of ULC applications. When
developing ULC applications it is also desirable to be able to start and stop the application servers. Application Controller has an extended or expert mode for this. In order to start AppController in expert mode use the the
run -server 2222 -expert
Figure 2: Application Controller in Expert Server Mode
In expert mode, the Java Application Controller presents more information (e.g. an additional Host column to indicate on which host the application's server is running) and has additional menu entries. A file menu item allows a user to bring up a launching panel. From this panel it is possible to start and stop the ULC application servers from the client machine.
Figure 3: Application Controller's launch panel
In the launching panel the user can start an application on the server machine by double clicking on an application's representation (or by selecting it and clicking the 'Launch Server' button).
A running server is visually indicated by its red light turning to green. Servers can be stopped again by selecting them and clicking the 'Kill Server' button.
The Smalltalk Application Controller can be configured directly through its user interfaceand hence does not require any external configuration. The sections below are relevant only for the Java Application Controller.
The ULC Java Application Controller can be configured through an external configuration file. (
The file is a regular Java property file in which key/value pairs can be specified as
(comments start with a
# and extend to the end of the line).
The configuration file included in the release
contains comments on all possible properties. Adding your own applications to the Controller is simple and straightforward. In expert mode, the Application Controller provides a menu entry to reload a changed
configuration file into the running application.
The configuration file consists of four parts which we describe in the following sections.General configuration propertiesThe Controller needs to know the absolute path name of the ULC distribution base directory:
# *** ULC runtime home (absolute path)
You need to change that line once to reflect the path in your local installation. Default application entryIn this part of the file the default properties are defined. Reasonable values are set for the default application properties in order to make configuration for new applications as easy as possible. Applications added to the Controller need only specify the differences from the default entry. For example, a typical default is preset for an application server's URL address:
# *** default URL (port 9999 on localhost)
Applications that have their servers running on the same host as the Application Controller are therefore only required to provide a port number and an optional programmatic application name.The programmatic application name is passed to the server when initiating the connection to distinguish
different applications running on the same virtual machine.Application list All applications that the Controller supports must be listed in a general ulc property:
# Identifiers of all supported ULC applications
The controller only searches property entries for applications identified in this list!
The identifiers are only used internally and need not correspond directly
to external or programmatic application names.
Individual application entries
In individual entries the applications listed can be configured to override
default properties. A typical entry for a Smalltalk application could
look like the following
(the Dossier sample Smalltalk application identified to the Controller as DossierS):
The properties for an individual application are prefixed with the application's identifier (as used in the application list). This example sets a label and icon for Dossier, specifies the programming language the application was written in, names the executable to use when launching in expert mode, and states the URL to use (blanks filled in by the default URL!).
Running as Applet
The Application Controller can be run as an applet like any other ULC application. It is integrated into the current applet launching scheme.