Helma logo
helma.org » Home > development > rfc > Application Introspection

Application Introspection

Draft for a way to let Helma application get and manipulate information about themselves.

By Application Introspection we mean a way for application designers to retrieve and possibly modify values internal to the running application. These values may be setup parameters, application files like skins and scripts, or relational database mappings.

This RFC proposes to make these values accessible via an object structure in the Application Object app, grouping them into these major categories:

app.setup For accessing general application settings.
app.prototypesFor accessing information belonging to the prototypes defined for this application.
app.propertiesFor accessing the content of the properties file of this application.

The purpose of these groups is to keep the app object as free as possible for application specific data (other than these properties, properties can be freely assigned to the app object in order to share application level information), as well as provide an intuitive structure for the introspection information.

The specific substructure of these branches is specified below. By restricting future extensions to the categories listed above it is guaranteed that they will not interfere with application designers' use of the app object.

app.prototypes

The app.prototypes object contains a property for each prototype defined for this application. The prototype introspection object contains further objects describing different aspects of the prototype. In the following table, <proto> stands for the name of the prototype being accessed, such as root, global etc.

app.prototypes.<proto>.skinsContains a list of string properties mirroring the content of the skin files defined for this prototype. The name of the property is the name of the skin file without the .skin file extension. The properties are read/write, so assigning a new value to an object will cause the skin file to be updated, and creating a new property will cause a new skin file to be created.


Up: Requests For Comments (RFCs)
Next: extending the structure beneath app.prototypes.

... comment


Page last modified on 2001-05-09 12:20 by hns