Portable Control Application

From TechWiki

Jump to: navigation, search

Contents

Introduction

The Portable Control Application is a Flex application that can be embedded as a Flash movie in a webpage, or that run as a Air desktop application. The Portable Control Application is a shell that embeds Semantic Components. It takes record(s) description(s) and schema(s) as inputs and feeds it to, and embeds, a sControl (the generic semantic control). This sControl then properly selects the semantic control to use to display the description of the record(s) according to the schema(s).

The Portable Control Application is only a runnable application, that aggregates all the needed data to feed to a sControl component.


General overview of the Portable Control Application

Data Access Usecases

Generally, all the data used to feed the various Semantic Components comes from a structWSF Web service endpoints. Different components will interact with different endpoints. Depending on how the user wants to implement a semantic component, he will have the choice to define two different data inputs for the components:

  1. Direct input of serialized data (via Flash variables and instance records serialized using structXML)
  2. Reference to a structWSF endpoint where the component can query the data (not yet implemented)

The Portable Control Application will check what has been defined by the user, will request the data to the web service endpoint if needed, will select the proper Semantic Component to use display the record(s) description(s) according to the input schema, and will feed that record(s) description to the proper Semantic Component.

Flash Variables

Flash variables can be used to feed record(s) and schema(s) description to a running instance of a Portable Control Application. Flash variables are normally defined in the HTML file that embeds the Flash movie of the Portable Control Application. This method makes it easy to embed standalone versions of the application with pre-loaded record(s) and schema(s) descriptions.

Variables

These are the core Flash variables used for both usecase #1 and #2:

Variable Description
baseAppUrl Specifies a specific URL where component settings files can be found

These are the Flash variables used for the usecase #1:

Variable Description
inputData Serialized data describing target record(s). The size of this serialized data has to be less than 65k in size. Input data is serialized in structXML.
inputTargetAttributes Reference to one or multiple target attributes to display in the control. Attributes are separated by the semi-column character ";"
inputTargetTypes Reference to one or multiple target types of records to display in the control. Types are separated by the semi-column character ";"
inputTargetRecords Reference to one or multiple target records to display in the control. Records are separated by the semi-column character ";"
inputSchemas Reference to one or multiple target schemas URLs Schemas are separated by the semi-column character ";"

These are the Flash variables used for the usecase #2:

Variable Description
inputWebService structWSF base web services endpoints URL (example: http://mydomain.com/ws/)
inputParameters Webservice HTTP query parameters
inputMethod HTTP method to use to send the HTTP query (GET or POST)

Limitations

Flash variables are handy to embed a Portable Control Application in a HTML page, and to feed the application with some structXML records description, without having to reference to any structWSF instance. The only limitation of this method, is that the size of the records description shouldn't exceed 65k in size. As soon as the size of the description of record(s) exceeds 65k, the Web service data access method has to be used.

Settings

The only setting file needed by the Portable Control Application is the General.xml setting file. All the other setting files are needed by different Semantic Components that can be ran by the sControl semantic component.

All information about how the settings system works can be read on the Semantic Component Settings Architecture page.

All information about the available settings, per component, can be accessed on the Semantic Component Settings page.

All settings files have to be located in the "settings" folder at the location of the "baseAppUrl" input Flash variable. The setting files have to be located at: /{baseAppUrl}/settings/*.xml

Personal tools