The Application Framework

The application framework is a set of objects allowing you to describe what your application does, and how it does it. We will use as example a simple web server application.

The ApplicationDef object

The applicationDef object is a product describing the features of the application.
In our example, the ApplicationDef will represent the web server executable.

The FeatureDef object

The FeatureDef object is a product describing an individual feature. A single application may provide any number of features. A feature may be provided by more than one application.
In our example, we will have the following FeatureDefs:
  • A feature to listen to an HTTP port
  • A feature to listen to an HTTPS port
  • A feature to serve a file based on an URL
  • Etc.

The Application object

The Application object represents an instance of an ApplicationDef. The Application object holds all specific setup information.

Retrieving the Application object

The application object, being an agent (and thus a configuration object,) has an identity represented by a unique id. Retrieving the application object thus means retrieving the key of the application configuration object.
Usually, you will want that an application running on a given workstation always exhibits the same behaviour. Thus, by default, Application is retrieved using the key ( ApplicationDef + Workstation ) This standard application is called the default application for this workstation. The default application is used each time no special option is given.
In some cases, you may want to run multiple instances of the application on a single workstation, each exhibiting a different behaviour. To do so, you must explicitly specify the object key. This can be done either on the command line or by a configuration file in the startup directory. To specify another application, you can:
  • Give the ID of another Application object.
  • Give the ID of another Workstation object. In this case, the application would act as the default application on the given workstation. This allows you to temporarily make an application behave as if it ran on another workstation, for example when the normal workstation is down for maintenance.

The ApplicationFeature objects

The ApplicationFeature objects represent each of the instances of features provided by the application.
In our example, the ApplicationFeatures of our web server would be:
  • Listening to the HTTP port 80
  • Listening to the HTTP port 8080
  • Listening to the HTTPS port 443
  • Serving pages from files in C:\InetPub\

As you can see, the ApplicationFeature objects have the following properties:
  • There may be more than one ApplicationFeature for the same feature. In our example, two ApplicationFeatures implement the "Listen to HTTP Port" feature
  • ApplicationFeature objects give additional parameters for the features. In our example, the port number or the directory.

Retrieving ApplicationFeature objects

TBD



Last edited Dec 6, 2009 at 1:07 PM by sleclercq, version 2

Comments

No comments yet.