OpenEdge Development: Mobile Applications - Product ...
OpenEdge Development: Mobile Applications - Product ...
OpenEdge Development: Mobile Applications - Product ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
JSDO overview<br />
JSDO overview<br />
A JSDO is an object designed to simplify access to <strong>OpenEdge</strong> relational data in a<br />
<strong>Mobile</strong> App. It does this by providing JavaScript methods to execute the <strong>Mobile</strong><br />
operations supported by a single <strong>Mobile</strong> resource, and supports an internal data store<br />
(JSDO local storage) to cache the <strong>OpenEdge</strong> data defined, and initially returned to the<br />
<strong>Mobile</strong> App, by the <strong>Mobile</strong> resource.<br />
The JSDO relies on a JSON catalog file (JSDO catalog) that defines the <strong>Mobile</strong><br />
resource it is accessing. This resource definition includes the schema (data model) for<br />
the <strong>OpenEdge</strong> data supported by the resource as well as the definitions for JSDO<br />
methods to call the <strong>Mobile</strong> operations of the resource. The schema of the <strong>Mobile</strong><br />
resource, therefore, determines both the structure of the data in JSDO local storage<br />
and how <strong>Mobile</strong> operations can interact with it. Other JSDO methods allow the <strong>Mobile</strong><br />
App to read and manipulate the data in JSDO local storage for ultimate update on the<br />
AppServer by calling the supported <strong>Mobile</strong> operations. In addition, the JSDO’s local<br />
storage provides features that facilitate mapping its data to HTML elements of a <strong>Mobile</strong><br />
App.<br />
The following sections briefly describe:<br />
• Supporting <strong>OpenEdge</strong> classes and objects<br />
• How a JSDO maps to a <strong>Mobile</strong> resource<br />
• How JSDO local storage works<br />
• Methods of a JSDO and the JSRecord object<br />
• Asynchronous and synchronous execution<br />
• Properties of a JSDO<br />
• Requirements for using a JSDO<br />
Supporting <strong>OpenEdge</strong> classes and objects<br />
<strong>OpenEdge</strong> <strong>Mobile</strong> provides the following classes and objects to support JSDO creation<br />
and access:<br />
• progress.data.JSDO class — Allows you to create JSDOs for <strong>Mobile</strong> resources<br />
that can execute the resource-supported <strong>Mobile</strong> operations that exchange the<br />
data defined by these resources between a <strong>Mobile</strong> App and an AppServer where<br />
the data is stored, as described in this “JSDO overview” section and the current<br />
chapter.<br />
• progress.data.Session class — Allows you to create a Session object that<br />
manages a user login session between the <strong>Mobile</strong> App and a <strong>Mobile</strong> Web<br />
application. This enables a JSDO to access the resources that a <strong>Mobile</strong> service<br />
supported by the <strong>Mobile</strong> Web application provides, as described in this “JSDO<br />
overview” section. For more information, see the “Managing user login sessions”<br />
section on page 117.<br />
• JSRecord object — References a JavaScript record object from JSDO local<br />
storage, as described in this “JSDO overview” section.<br />
<strong>OpenEdge</strong> ® <strong>Development</strong>: <strong>Mobile</strong> <strong>Applications</strong> 91