01.06.2013 Views

OpenEdge Development: Mobile Applications - Product ...

OpenEdge Development: Mobile Applications - Product ...

OpenEdge Development: Mobile Applications - Product ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Contents<br />

3. Creating <strong>Mobile</strong> Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63<br />

Getting started with <strong>OpenEdge</strong> <strong>Mobile</strong> development . . . . . . . . . . . . . . . . . . . . . . . . 64<br />

Starting up Developer Studio for <strong>Mobile</strong> development . . . . . . . . . . . . . . . . 64<br />

Configuring and managing <strong>OpenEdge</strong> servers from Developer Studio . . . 65<br />

Creating an <strong>OpenEdge</strong> <strong>Mobile</strong> project . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66<br />

Creating and testing a <strong>Mobile</strong> service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68<br />

Coding AppServer services for <strong>OpenEdge</strong> <strong>Mobile</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . 69<br />

Singleton classes and procedures as <strong>Mobile</strong> resources. . . . . . . . . . . . . . . 69<br />

Coding ABL routines to implement a <strong>Mobile</strong> resource . . . . . . . . . . . . . . . . 70<br />

Creating <strong>Mobile</strong> resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77<br />

Using the New Business Entity wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77<br />

Using the Define Service Interface wizard . . . . . . . . . . . . . . . . . . . . . . . . . 78<br />

Creating <strong>Mobile</strong> services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79<br />

Using the New <strong>Mobile</strong> Service wizard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79<br />

Modifying and deleting <strong>Mobile</strong> services . . . . . . . . . . . . . . . . . . . . . . . . . . . 79<br />

Publishing <strong>Mobile</strong> services for testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80<br />

URIs for accessing <strong>Mobile</strong> Web applications, services, and resources . . . . . . . . . . 81<br />

<strong>Mobile</strong> URIs for <strong>Mobile</strong> App access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81<br />

<strong>Mobile</strong> URIs for testing access from REST clients . . . . . . . . . . . . . . . . . . . 84<br />

Using a REST client to invoke a <strong>Mobile</strong> operation . . . . . . . . . . . . . . . . . . . 86<br />

4. Creating <strong>Mobile</strong> Apps using JSDOs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87<br />

Creating a <strong>Mobile</strong> App from Developer Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89<br />

Getting started with the <strong>Mobile</strong> App Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90<br />

JSDO overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91<br />

Supporting <strong>OpenEdge</strong> classes and objects . . . . . . . . . . . . . . . . . . . . . . . . 91<br />

How a JSDO maps to a <strong>Mobile</strong> resource . . . . . . . . . . . . . . . . . . . . . . . . . . 92<br />

How JSDO local storage works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93<br />

Methods of a JSDO and the JSRecord object . . . . . . . . . . . . . . . . . . . . . . 96<br />

Asynchronous and synchronous execution . . . . . . . . . . . . . . . . . . . . . . . . 98<br />

Properties of a JSDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102<br />

Requirements for using a JSDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103<br />

Creating a JSDO for a <strong>Mobile</strong> resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105<br />

Accessing built-in CRUD operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106<br />

Read operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106<br />

Create operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108<br />

Update operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109<br />

Delete operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111<br />

Batch saving of changes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114<br />

Accessing non-built-in invoke operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115<br />

Asynchronous vs. synchronous method execution. . . . . . . . . . . . . . . . . . . 115<br />

Invocation method example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115<br />

Managing user login sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117<br />

Requirements for creating a user login session . . . . . . . . . . . . . . . . . . . . . 117<br />

Default Web pages to support <strong>Mobile</strong> App login. . . . . . . . . . . . . . . . . . . . . 119<br />

Getting started with other HTML coding tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122<br />

Using the UIHelper class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122<br />

Using a custom template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125<br />

Publishing <strong>Mobile</strong> Apps for testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127<br />

5. Deploying <strong>Mobile</strong> <strong>Applications</strong>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129<br />

Deployment overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130<br />

Packaging and deploying <strong>Mobile</strong> services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131<br />

Packaging and Deploying iOS Apps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132<br />

Packaging iOS Apps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132<br />

Deploying iOS Apps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134<br />

4 <strong>OpenEdge</strong> ® <strong>Development</strong>: <strong>Mobile</strong> <strong>Applications</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!