...
- How frequently will this data change - daily, weekly, monthly?
- How should updates be sent to users? Automatically or manually?
Data Suitcase Currency
Basic-Mode Devices
Basic-mode devices are not assumed to have sufficient device-side storage. When these devices access an XSLT interaction, only the result of the XSLT is transmitted to the device. As the XSLT is performed entirely on our server, the very latest version of the Data Suitcases is always available.
Advanced-Mode Devices
Advanced-Mode Devices devices Devices (and native applications) typically have mechanisms available to store data on the device.
Our platform is designed to allow these devices to function with intermittent or absent network connections.
...
Further, this data is provided via an unprotected web service to our advanced-mode client, therefore any person with knowledge of the URL, answerSpace and Suitcase name can access it.
mADL (PHP) Commands include
These commands allow mADL (PHP) Interactions to perform operations on Server-Hosted Data Suitcases. All commands will return a Boolean “false” if they fail. “set...” and “delete...” will return a Boolean “true” upon success, while “get...” will return the requested Suitcase contents if successfully located.
...
Personal Data Suitcases are embedded in interactions, and are delivered to the user when they visit these interactions. If this is a mADL (PHP) interactions (and it usually will be), then standard PHP and MADL may be used to construct the Suitcase, tailoring the data to the user based on contextual information (account credentials, etc).
Security
As this Suitcase will be transferred via a web service to advanced-mode devices, it is recommended that the answerSpace be set to use SSL at all times. This is especially true if the Suitcase contains confidential information. answerspaces already using our Custom Login system will be able to readily confirm the authentication and authorisation of users prior to building and transmitting the Suitcase. In any case, we recommend that suitable logic be built around Personal Data Suitcases so that they are not generated for anonymous or unauthorised users.
Indeed, as confidential information is not held in our system (by default), this information must be provided by a third-party web service. It is likely, then, that the web service itself will require authentication prior to responding with confidential information (if it is sufficiently designed).
Storage on the Device
For advanced-mode devices, the contents of all Suitcases are stored on the device itself, facilitating offline and/or transmission-free use. No Suitcase is currently compressed or encrypted when stored. At this time we have plans to offer this functionality solely to native applications in a future update.
Disclosure via another answerspace / interaction.
This persistent storage is unfortunately domain-specific (by W3C design). As such, malicious code in one answerspace on blinkm.co may be able to access Suitcases stored on the same device by another answerSpace on blinkm.co. If successful, it is possible to then transmit the Suitcase via JavaScript to any desired destination on the Internet.
There are sufficient limits on this particular vector that make it difficult to perform. Such code would need to know the names of the other answerspace and the target Suitcase. The user would need to authenticate themselves with one answerspace, receive the Suitcase, then visit the malicious answerspace / interaction.
Disclosure via Compromised Device
Suitcases are not encrypted in when stored. A malicious third-party may be able to exploit a flaw in the device’s operating system or browser, or may be able to gain physical access to the device. In either of these cases we cannot trust that the Suitcase was not compromised.
We recommend (but cannot enforce) that users always update their devices with official software from their carrier / manufacturer.
Disclosure via Compromised Server
If a Suitcase is used via a basic-mode device (older browsers, less-powerful devices), then the contents of the Suitcase may be stored on the server in a private session. However unlikely, a malicious attacker with sufficient access to our servers may be able to compromise such a Suitcase.
Recommendations
At this time, the safest Personal Data Suitcases usage is performed via an SSL-only answerSpace running within the native application. Any Suitcase in the advanced-mode web application is not sufficiently partitioned from other answerspaces.
If encrypted device-side storage is a requirement for a high-priority project, then we will discuss allocating development resources so that the native application gains sufficient encryption functions.
mADL Commands.
When a user navigates to an interaction containing such a Control Message, an advanced-mode device will perform the desired operation on a Data Suitcase persistently stored on the device. For basic-mode, the server will interpret the Control Message prior to transmitting the Interaction to the device, and the Suitcase will be stored in a private session.
Usage Notes
- Currently, the only supported use case is for the $xml string to contain well-formed (pre-validated) XML, to serve as input data for a separate XSLT interaction.
- The only supported method of creating the Control Message is via the provided MADL commands. It is technically possible to permanently embed a static Personal Data Suitcase within a Message Interaction, or indeed create one within an XSLT interaction. There is no convincing use case that allows us to encourage answerspace builders to do this, however.
...
active-forms Data Suitcases
The Active Forms List (formerly known as the Pending Queue) is a special-purpose Interaction or view that displays any form records that have not yet been submitted to the server.
...
See Active Forms List section for more information.
Stars Data Suitcases
...
Info |
---|
...
|
...
| |
STARS Data Suitcases |
...
Data Suitcases can be created, modified and deleted using mADL Functions. They include
- $t->addControlMessage()
- $t->setjourneyobject( )
- $t->getjourneyobject( )
- $t->DeleteJourneyObject( )
- $t->listJourneyObjects( )
Data Suitcases and Javascript
processMoJOs ()
This global function triggers the process of retrieving all public Data Suitcases for an answerSpace. Any content that has been previously downloaded may be replaced / updated during this process.
Parameters | |
---|---|
processMoJOs () | |
Return Values | |
---|---|
@returns {jQueryPromise} | |
Data Suitcases Populating A BlinkForm
As most uses of this involve XPath queries under your control, the precise tag used for the root element is not important, although valid XML specifies exactly 1 root element. This format is used for network transmission, and data suitcase (MoJO) storage.
Glossary #
- field type: BlinkForms2 types are not the same as the HTML Input Type.
- field name: unique identifier (within the form) for the field, matches a DB column, restricted characters (\w+)
- field label: not necessarily the same as the name, fewer restrictions on characters
- form object name: unique identifier (within an answerSpace) for the form, matches a DB table, restricted characters (\w+).
- tuple: Database-speak for a particular row / record in a DB table
Example 1
...
were designed for BIC2 only are are not longer supported. |
They use a combination of a stored XML file and Blink-starrable style sheet
To create a "Starred" list, article or form, you must add the Blink-starrable style sheet to your interaction.
This can be achieved by adding it to your code either as part of of some HTML or in the second parameter of your fetch rows command.
The Blink-starrable style sheet allows you to add a link reference of your interaction result to a stored XML document held locally.
When an item is "Starred" a record is entered into the XML document. Besides the primary reference you can also add additional variables for storage and use in your favourites page. This page usually will display all the "Starred" items within the answerspace for easy retrieval and if required "de-Starring".
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
<root>
<formObject1Name>
<fieldName1>value</fieldName1>
<fieldName2>value</fieldName2>
<fieldName3>value</fieldName3>
<fieldName4>
<!-- sub_form type -->
<formObject2Name>
<fieldName1>value</fieldName1>
<fieldName2>value</fieldName2>
</formObject2Name>
<formObject2Name>
<fieldName1>value</fieldName1>
<fieldName2>value</fieldName2>
</formObject2Name>
</fieldName4>
<fieldName5>
<!-- multi(-select) or checkboxes type -->
valueA
valueB
</fieldName5>
</formObject1Name>
<formObject1Name>
<fieldName3>value</fieldName3>
<fieldName4>
<!-- sub_form type -->
<formObject2Name>
<fieldName2>value</fieldName2>
</formObject2Name>
</fieldName4>
</formObject1Name>
</root> |
Example 2
Here are some examples including correct field formats.
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
<yourtext>
Sample TextBlink Forms is now saving your Blink Form Object and generating
Blink Forms Definitions which should allow you to view
and use the form once this process has completed successfully.</yourtextarea>
<yourselectbox>2</yourselectbox>
<yourdate>2012-07-27T00:00:00+10:00</yourdate>
<yourtime>12:38:55+10:00</yourtime>
<yourdatetime>2012-10-30T00:09:30+10:00</yourdatetime>
<yourradio>Option A</yourradio>
<yourlocation>{"altitude":null,"latitude":-33.868901,"altitudeAccuracy"
:null,"heading":null,"accuracy":25000,"longitude":151.207091,"speed":null}</yourlocation>
<yourmulti>Option A
Option D</yourmulti>
<yourimage>data:image/png;base64,YourBase 64 encoded string</yourimage>
<yoursignature>data:image/png;base64,Your Base 64 encoded string
</yoursignature> |
You can download the sample XML code and an answerspace example in the attachments section below.
JSON
This format is used for local storage in the submission queue, and loosely describes the non-JSON data structure used in the HTTP POST transaction for form submissions.
Note that this has been formatted with additional non-compliant white-space for educational purposes. We recommend working with JSON as it is generated by software, which will not contain this additional white-space.
Example 3
Here is 1 tuples (records) for the formObject1Name form.
Code Block | |
---|---|
theme | RDark |
language | xml | title | Example 3$t->rows("|<h2><a href=\"/{URL}\" title=\"{TITLE}\">~*<div class=\"field-item odd\">{TEASER}</div>~*<img src=\"{THUMB}\" |U",
"My output and containers built from the body in the code builder....
<span class=\"blink-starrable\"
data-type=\"OBJECTITEM\"
data-DATYPE=\"PLACES\"
data-id=\"{URL}\"
data-NAME=\"{TITLE}\"
data-URL=\"../visitor_details/?\"
data-ARGS0=\"{URL}\"
data-ARGS1=\"{TITLE}\"
data-ARGS2=\"{IMAGE}\"
</span>"); |
Blink-starrable style sheet
The Blink-starrable style sheet consists of several parameters.
Parameter | Description |
---|---|
span-type: | must stay as "blink-starrable". |
data-type: | must stay as "OBJECTITEM". |
data-DATYPE: | can be a unique string to identify the type of interaction results. You may have for example "PLACES" for search results scrapped from a travel site and maybe "SITES" from a scrap of a websites search. This reference is needed when searching stored results in the XML document and acts as the XML entity. |
data-id: | is the reference to interaction or results. This usually is a "Container" {mycontainer} from the rows retrieval. Its a link back to the result normally a url or a title and is the suede primary key. Important. While urls are great to use, if they contain special characters it may break the starring and cause fault results. I recommend using the results title or name instead. |
data-____: | can be strings for storing types of field data. You may want to store all the containers scrapped from your rows fetch for later usage even as shown a link to the details interaction in the listing example. |
For more information on "Starring" download the Data Suitcases - Step by Step.pdf
mADL Commands.
These mADL commands can help you setting stars on or off or clearing all starred items in your data suitcase.
There are tree types, "On", "Off", "Clear".
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ “fieldName1”: “value”, “fieldName2”: “value”, “fieldName3”: “value”, “fieldName4”: [ { // field values for a new subForm tuple “fieldName1”: “value” “fieldName2”: “value” }, { “fieldName1”: “value” “fieldName2”: “value” }, “subTuple3” // primary key for existing subForm tuple ], “fieldName5”: [ // multi(-select) or checkboxes type “value”, “value”, “value” ] }$t->addControlMessage(array( 'startype' => 'session', 'staron' => array(1,2,3,4), )); return $t->result; $t->addControlMessage(array( 'startype' => 'session', 'staroff' => array(5,6), )); return $t->result; $t->addControlMessage(array( 'startype' => 'session', 'clearstars' => '' )); return $t->result; |
Info | ||
---|---|---|
| ||
STARS Data Suitcases were designed for BIC2 only are are not longer supported. |
Data Suitcases and mADL
Data Suitcases can be created, modified and deleted using mADL (PHP) Functions. They include
- $t->addControlMessage()
- $t->setjourneyobject( )
- $t->getjourneyobject( )
- $t->DeleteJourneyObject( )
- $t->listJourneyObjects( )
Data Suitcases and Javascript
Description | Function | Returns |
---|---|---|
This global function triggers the process of retrieving all public Data Suitcases for an answerSpace. | processMoJOs () | @returns {jQueryPromise} |
To store a data suitcase with Javascript you can use | MyAnswers.store.set( 'mojoXML:my_mojo_name' , data); | @returns {jQueryPromise} |