i2b2 Web Client
Space shortcuts
Space Tools
Skip to end of metadata
Go to start of metadata

Overview

The state of Web 2.0 technology today is equivalent to the MS-DOS era of desktop computing in that drag & drop, graphical display/manipulation, and inter-application data communication did not exist or existed in extremely simple forms. As a result, applications had to invent the wheel each time this type of advanced functionality was needed. Inter-application communication was essentially non-existent. When Microsoft created Windows it created standardized libraries of routines for use by applications. This standardization also allowed for the creation of communication methods to transfer data between different applications. In modern computing, the computer's OS handles all the complexities of data communication internally. However, this functionality ends at the browser window.

For multiple web applications/components to exist within a browser window and effectively communicate with one another, a standardized communications channel must be created by the parent framework. This is accomplished in the i2b2 web client through the Standard Data Exchange subsystem (or "SDX Subsystem") that is used by all cells and plug-ins to allow drag & drop functionality to, or from, their visual elements. The SDX subsystem handles all drag and drop operations, routing of SDX data events to global / localized handler code and more. It can be thought of as being the "kernel code" needed to enable various low-level operations within the web browser.


There are three fundamental operations that are performed by the SDX subsystem:

  1. Encapsulation of data into a standardized form.
  2. Management of Drag & Drop targets.
  3. Calling registered event handler routines when a valid drop occurs.



The general life cycle of a data record within the web client framework is show in the diagram below comprising of the steps:

  1. Loading of a record's XML from a Cell Communicator message or the original XML snippet from a previous SDX record.
  2. Encapsulation of record's XML / JSON data into an SDX record.
  3. Saving of the said SDX record into the local data model.
  4. Rendering HTML representation of the SDX record.
  5. Drag & Drop event processing
  6. Loading an SDX record corresponding to the DIV manipulated and dropped in the previous step.
  7. Firing the onDrop event handler of the drop target and passing it to the loaded SDX record.



Overview of Data Storage and Retrieval by SDX Drag & Drop Operations


Message Format

The standard SDX data package contains the following information in the form of a JSON object:

Namespace

Description

parent

A single SDX object representing that is "parent" to the record. (when applicable)

children

Prototype Hash object containing "child" SDX objects of this record. (when applicable)

sdxInfo

A container holding the minimal amount of data that represents this DB record.

    sdxControllCell

The code for the i2b2 Cell that controls this SDX data-type.

    sdxDisplayName

A string that represents the title of the SDX object's visual element. (DIV begin dragged)

    sdxKeyName

The DB name of the primary key column within the database for this SDX data type.

    sdxKeyValue

The value of the primary key within the database for this DSX object's underlying data record.

    sdxType

The code declaring what type of SDX data type this object represents

origData

Contains information that is saved by the controlling cell for rapid access (avoids XML processing).

    xmlOrig

Pointer to XML DOM Node that created the record.

renderData

Information saved by the SDX framework to speed automatic rendering of the record.



Inspection of SDX Message data using Firebug


  • No labels