Inside the JSDO: Mobile and Web -...

Preview:

Citation preview

Inside the JSDO: Mobile and Web

Edsel Garcia Principal Software Engineer Progress Software egarcia@progress.com

© 2014 Progress Software Corporation. All rights reserved. 2

1

2

3 4

5

JSDO

JSDO Services

Templates

Deployment

Other Web UI Frameworks

© 2014 Progress Software Corporation. All rights reserved. 3

1 JSDO

© 2014 Progress Software Corporation. All rights reserved. 4

JSDO – Progress JavaScript Data Object

Access to OpenEdge Database

Access to the OpenEdge AppServer

Business Entities

XMLHttpRequest

ProDataSet

CRUD + Invoke

© 2014 Progress Software Corporation. All rights reserved. 5

JSDO – Progress JavaScript Data Object

Access to Rollbase backend

CRUD + Invoke + Submit

• JSON Before-Image support

Offline/Online events in the Session object

© 2014 Progress Software Corporation. All rights reserved. 6

Runtime Architecture for Rollbase Mobile

Client-side App resides on

device

*.html *.js

Internet

HTTP (REST / JSON)

Business Entity

JSDO-BE Mapping

JSDO

ABL Header

Data

Detail Data

Other Data

Header Data

Detail Data

Other Data

Mobile Device Web Server OpenEdge AppServer

PO ProDataSet

Server-side n-tier architecture with

Business Logic and data

© 2014 Progress Software Corporation. All rights reserved. 7

Business Entity

Progress Developer Studio

Express Project Wizard

Business Entity Wizard

Types

Read-only

CRUD

CRUD + Submit

JSON Before-Image support

© 2014 Progress Software Corporation. All rights reserved. 8

Business Entity

© 2014 Progress Software Corporation. All rights reserved. 9

Business Entity

© 2014 Progress Software Corporation. All rights reserved. 10

Business Entity

© 2014 Progress Software Corporation. All rights reserved. 11

Business Entity

© 2014 Progress Software Corporation. All rights reserved. 12

Business Entity

© 2014 Progress Software Corporation. All rights reserved. 13

Create, Read, Update, Delete + INVOKE + SUBMIT

CRUD + I + S

POST GET PUT DELETE PUT PUT

Array [ ]

Temp-Table { ttCustomer: [ ] }

DataSet { dsCustomer: { ttCustomer: [ ] } DataSet (Complex) { dsCustomer: { ttCustomer: [ ], … ttOrder: [ ] }

/method /method path: “”

© 2014 Progress Software Corporation. All rights reserved. 14

JSDO Catalog

© 2014 Progress Software Corporation. All rights reserved. 15

JSDO – Progress JavaScript Data Object

CRUD + Invoke • add() (CREATE)

• fill() (READ)

• assign() (UPDATE)

• remove() (DELETE)

• method() (INVOKE)

Properties • autoSort

• autoApplyChanges

• caseSensitive

• name

• record

• useRelationships

Methods • addRecords()

• acceptChanges(), rejectChanges()

• find()

• findById()

• foreach()

• getData()

• getId()

• getSchema()

• saveChanges()

• sort()

• subscribe()

• unsubscribe()

© 2014 Progress Software Corporation. All rights reserved. 16

JSDO – Progress JavaScript Data Object

JSDO – progress.jsdo.3.0.js

Session – progress.jsdo.3.0.js

Included in Mobile App Builder projects

© 2014 Progress Software Corporation. All rights reserved. 17

JSDO – Using the JSDO

session = new progress.data.Session(); session.login(<url-to-service>, "", ""); session.addCatalog(<url-to-jsdo-catalog>); jsdo = new progress.data.JSDO({ name: 'dsCustomer' }); jsdo.subscribe('AfterFill', onAfterFillCustomers, this); jsdo.fill();

JSDO

© 2014 Progress Software Corporation. All rights reserved. 19

1 JSDO

Benefits Leverage Existing

Business Logic

© 2014 Progress Software Corporation. All rights reserved. 20

1

2

JSDO

JSDO Services

© 2014 Progress Software Corporation. All rights reserved. 21

JSDO Services

Access to the JSDO from the Mobile App Builder JSDO Catalog CRUD:

• Create

• Read

• Update

• Delete

Row Invoke Submit

JSDO Services

© 2014 Progress Software Corporation. All rights reserved. 23

1

2

JSDO

JSDO Services

Benefits Leverage Existing

Business Logic

Visual Mapping

© 2014 Progress Software Corporation. All rights reserved. 24

1

2

3

JSDO

JSDO Services

Templates

© 2014 Progress Software Corporation. All rights reserved. 25

Templates

Project Templates • Phone App / Tablet App

• Session-enabled templates

• Express Project

– UIHelper (dynamic)

– JSDO Services (generated)

Templates

Screen Templates

Custom Components

Templates

© 2014 Progress Software Corporation. All rights reserved. 29

1

2

3

JSDO

JSDO Services

Templates

Benefits Leverage Existing

Business Logic

Visual Mapping

Increase Productivity, Quicker Time to Market

© 2014 Progress Software Corporation. All rights reserved. 30

1

2

3 4

JSDO

JSDO Services

Templates Other Web UI Frameworks

© 2014 Progress Software Corporation. All rights reserved. 31

Other Web UI Frameworks

Web

Angular.js

Sencha Touch

Kendo UI

Knockout.js

Qooxdoo

Dojo Toolkit

© 2014 Progress Software Corporation. All rights reserved. 32

Other Web Frameworks

Node.js

XMLHttpRequest = require("./XMLHttpRequest.js").XMLHttpRequest; require("./progress.jsdo.3.0.js"); session = new progress.data.Session(); session.login(<url-to-service>, "", ""); session.addCatalog(<url-to-jsdo-catalog>); jsdo = new progress.data.JSDO({ name: 'dsCustomer' }); jsdo.subscribe('AfterFill', onAfterFillCustomers, this); jsdo.fill(); function onAfterFillCustomers(jsdo, success, request) { jsdo.eCustomer.foreach(function(customer) { console.log(jsdo.eCustomer.Name); }); }

Other Web Frameworks

© 2014 Progress Software Corporation. All rights reserved. 34

1

2

3 4

JSDO

JSDO Services

Templates Other Web UI Frameworks

Benefits Leverage Existing

Business Logic

Visual Mapping

Increase Productivity, Quicker Time to Market

Flexible

© 2014 Progress Software Corporation. All rights reserved. 35

1

2

3 4

5

JSDO

JSDO Services

Templates

Deployment

Other Web UI Frameworks

© 2014 Progress Software Corporation. All rights reserved. 36

Deployment

Build native app for iOS and Android using PhoneGap Cloud based build Distribution certificate and provisioning profile needed for iOS Auto-generated key/certificate for Android

• Install from Unknown Sources allows install on device

Install options: • Over the Air Install (iOS) • iTunes sync (iOS) • Download from web site (Android)

Rollbase Mobile Native Tester

Deployment

© 2014 Progress Software Corporation. All rights reserved. 38

Deployment

© 2014 Progress Software Corporation. All rights reserved. 39

Deployment

© 2014 Progress Software Corporation. All rights reserved. 40

Deployment

© 2014 Progress Software Corporation. All rights reserved. 41

Deployment

© 2014 Progress Software Corporation. All rights reserved. 42

Deployment

© 2014 Progress Software Corporation. All rights reserved. 43

1

2

3 4

5

JSDO

JSDO Services

Templates

Deployment

Other Web UI Frameworks

Benefits Leverage Existing

Business Logic

Visual Mapping

Increase Productivity, Quicker Time to Market

Flexible

Write Once, Deploy Everywhere

© 2014 Progress Software Corporation. All rights reserved. 44

Leverage Existing Business Logic

Visual Mapping

Increase Productivity, Quicker Time to Market

Flexible

Write Once, Deploy Everywhere

Benefits

1

2

3 4

5

JSDO

JSDO Services

Templates

Deployment

Other Web UI Frameworks

Write Once, Run Anywhere Portability with the Benefits of Native Applications and Web The Easiest Way to Build an OpenEdge and Rollbase Applications Supporting Mobile Devices, End-to-end

Extra Resources

Search Rollbase documentation: http://documentation.progress.com/output/Rollbase/index.html

Search the Community: OpenEdge 11.4 Production Documentation

Mobile App Builder documentation: http://docs.mobile.rollbase.com/

JSDO Examples:

• http://oemobiledemo.progress.com/jsdo/example001.html

• http://oemobiledemo.progress.com/jsdo/example007.html

Get session details & presentation downloads Complete a survey Access the latest Progress product literature

www.progress.com/exchange2014

Visit the Resource Portal

Recommended