Instantiating UcompOS Global (Continuum) Variables at Startup

In my post about UcompOS Shared Objects, I described how the UcompOS Portal furnishes a Shared Object Implementation that can be written to and read by any UcompOS entity in the UcompOS Continuum.

In a large-scale UcompOS Rich Portal Application, you very likely may find a need to share complex data across multiple UcompOS entities.

One effective approach to this challenge is to use the UcompOSGlobalManagerProxy class’s setSharedObject(), getSharedObject(), and getSharedObjects() methods.

These methods get/set shared objects on the UcompOS Portal at run-time.

But what if you want to populate the UcompOS Portal’s shared Object at start-up even before any UcompOS applications are launched?

As of the version 0.4.1 Milestone release of UcompOS RPF, there is a way to do this.

The key is a new <globalVariables/> element that can be added as a child element to the root <applications/> element in a dock manifest and as a child element to the root <application/> element in a UcompOS application manifest.

Below is a simple example of this in action in the dock manifest of my Educator 2 software application being built entirely on top of the UcompOS RPF:

<?xml version="1.0" encoding="utf-8"?>
	<application background="true" default="true">

Each global variable is wrapped in a <globalVariable/> element with child <key/> and <value/> elements.

All global variables in the dock manifest will automatically be added to the UcompOS Portal’s Shared Object implementation and will immediately be available to all UcompOS entities.

String Substitutions in Manifest Files

In the above example, notice I am instantiating global variable named _PROTOCOL and _DOMAIN_. And then notice that those strings appear in my <application/> element.

A string substitution will automatically take place here such that the <application/> value will be after the substitution.

As mentioned earlier, the <globalVariables> element is supported in both application manifests and dock manifests so you can also establish global variables in this fashion when launching a UcompOS application.

Typing Shared Objects

The <value/> element supports an optional type attribute such that you can articulate the data type of a Shared Object.

The best way to show how this is accomplished is with examples:


	<value type="Array">


	<value type="Object">

The type attribute can also be of type uint, int, Boolean, Number and String. The default data type is String. Also, the <item/> element supports the type attribute for Arrays and Objects.

Also, nesting of complex data structures is supported, so you can implement an Array of Arrays, or an Array of Objects, etc.

About Edward Mansouri
Edward Mansouri is the CEO and Founder of, Inc., a company focused on building scalable and profitable e-Learning enterprises. His expertise is in building e-Learning software, as well as in building visual frameworks such as the Enrich Content Enrichment System and the newly announced UcompOS Rich Experience Framework. He has been working with Flash since 1998, building Flash applications since 2002, and working with Adobe AIR since its private alpha release in 2006. He authored the site (later renamed to dedicated to providing leadership in building Adobe AIR applications. In 2010, he is building and releasing a new e-Learning platform called Educator 2 which is built entirely upon the UcompOS Rich Experience Framework. Since 1999, over 1,000,000 students have taken courses served with his original e-Learning platform, Educator 1.

Comments are closed.