Inside the JSDO: Mobile and Web
Edsel Garcia Principal Software Engineer Progress Software [email protected] JSDO 1
JSDO Deployment 5 2 Services
Other Web UI 4 3 Templates Frameworks
2 © 2014 Progress Software Corporation. All rights reserved. JSDO 1
3 © 2014 Progress Software Corporation. All rights reserved. JSDO – Progress JavaScript Data Object
. Access to OpenEdge Database
. Access to the OpenEdge AppServer
. Business Entities
. XMLHttpRequest
. ProDataSet
. CRUD + Invoke
4 © 2014 Progress Software Corporation. All rights reserved. JSDO – Progress JavaScript Data Object
. Access to Rollbase backend
. CRUD + Invoke + Submit
• JSON Before-Image support
. Offline/Online events in the Session object
5 © 2014 Progress Software Corporation. All rights reserved. Runtime Architecture for Rollbase Mobile
OpenEdge Mobile Device Web Server AppServer
HTTP (REST / JSON)
Internet
*.js *.html Business Entity JSDO JSDO-BE Header Data Mapping ABL Detail Data Header PO ProDataSet Other Data Data Detail Data Other Data Client-side Server-side App resides on n-tier architecture with device Business Logic and data
6 © 2014 Progress Software Corporation. All rights reserved. Business Entity
Progress Developer Studio Types
. Express Project Wizard . Read-only . Business Entity Wizard . CRUD . CRUD + Submit . JSON Before-Image support
7 © 2014 Progress Software Corporation. All rights reserved. Business Entity
8 © 2014 Progress Software Corporation. All rights reserved. Business Entity
9 © 2014 Progress Software Corporation. All rights reserved. Business Entity
10 © 2014 Progress Software Corporation. All rights reserved. Business Entity
11 © 2014 Progress Software Corporation. All rights reserved. Business Entity
12 © 2014 Progress Software Corporation. All rights reserved. Create, Read, Update, Delete + INVOKE + SUBMIT
CRUD + I + S
path: “” /method /method
POST GET PUT DELETE PUT PUT
Array [ ] Temp-Table { ttCustomer: [ ] } DataSet { dsCustomer: { ttCustomer: [ ] }
DataSet (Complex) { dsCustomer: { ttCustomer: [ ], … ttOrder: [ ] }
13 © 2014 Progress Software Corporation. All rights reserved. JSDO Catalog
14 © 2014 Progress Software Corporation. All rights reserved. JSDO – Progress JavaScript Data Object
. CRUD + Invoke . Methods • add() (CREATE) • addRecords() • fill() (READ) • acceptChanges(), rejectChanges() • assign() (UPDATE) • find() • remove() (DELETE) • findById() • method() (INVOKE) • foreach() . Properties • getData()
• autoSort • getId() • autoApplyChanges • getSchema() • caseSensitive • saveChanges() • name • sort() • record • subscribe() • useRelationships • unsubscribe()
15 © 2014 Progress Software Corporation. All rights reserved. JSDO – Progress JavaScript Data Object
. JSDO – progress.jsdo.3.0.js
. Session – progress.jsdo.3.0.js
. Included in Mobile App Builder projects
16 © 2014 Progress Software Corporation. All rights reserved. JSDO – Using the JSDO
session = new progress.data.Session(); session.login(
jsdo = new progress.data.JSDO({ name: 'dsCustomer' }); jsdo.subscribe('AfterFill', onAfterFillCustomers, this);
jsdo.fill();
17 © 2014 Progress Software Corporation. All rights reserved. JSDO
JSDO 1
Benefits . Leverage Existing Business Logic
19 © 2014 Progress Software Corporation. All rights reserved. JSDO 1
JSDO 2 Services
20 © 2014 Progress Software Corporation. All rights reserved. JSDO Services
. Access to the JSDO from the Mobile App Builder . JSDO Catalog . CRUD: • Create • Read • Update • Delete . Row . Invoke . Submit
21 © 2014 Progress Software Corporation. All rights reserved. JSDO Services
JSDO 1
Benefits . Leverage Existing Business Logic JSDO 2 Services . Visual Mapping
23 © 2014 Progress Software Corporation. All rights reserved. JSDO 1
JSDO 2 Services
3 Templates
24 © 2014 Progress Software Corporation. All rights reserved. Templates
. Project Templates • Phone App / Tablet App • Session-enabled templates • Express Project – UIHelper (dynamic) – JSDO Services (generated) . Templates . Screen Templates . Custom Components
25 © 2014 Progress Software Corporation. All rights reserved. Templates
JSDO 1
Benefits . Leverage Existing Business Logic JSDO . Visual Mapping 2 Services . Increase Productivity, Quicker Time to Market
3 Templates
29 © 2014 Progress Software Corporation. All rights reserved. JSDO 1
JSDO 2 Services
Other Web UI 4 3 Templates Frameworks
30 © 2014 Progress Software Corporation. All rights reserved. Other Web UI Frameworks
. Web
. Angular.js
. Kendo UI
. Knockout.js
. Qooxdoo
31 © 2014 Progress Software Corporation. All rights reserved. Other Web Frameworks
. Node.js XMLHttpRequest = require("./XMLHttpRequest.js").XMLHttpRequest; require("./progress.jsdo.3.0.js");
session = new progress.data.Session(); session.login(
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); }); }
32 © 2014 Progress Software Corporation. All rights reserved. Other Web Frameworks
JSDO 1
Benefits . Leverage Existing Business Logic JSDO . Visual Mapping 2 Services . Increase Productivity, Quicker Time to Market . Flexible
Other Web UI 4 3 Templates Frameworks
34 © 2014 Progress Software Corporation. All rights reserved. JSDO 1
JSDO Deployment 5 2 Services
Other Web UI 4 3 Templates Frameworks
35 © 2014 Progress Software Corporation. All rights reserved. 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
36 © 2014 Progress Software Corporation. All rights reserved. Deployment
Deployment
38 © 2014 Progress Software Corporation. All rights reserved. Deployment
39 © 2014 Progress Software Corporation. All rights reserved. Deployment
40 © 2014 Progress Software Corporation. All rights reserved. Deployment
41 © 2014 Progress Software Corporation. All rights reserved. Deployment
42 © 2014 Progress Software Corporation. All rights reserved. JSDO 1
Benefits . Leverage Existing JSDO Deployment Business Logic 5 . Visual Mapping 2 Services . Increase Productivity, Quicker Time to Market . Flexible . Write Once, Deploy Everywhere
Other Web UI 4 3 Templates Frameworks
43 © 2014 Progress Software Corporation. All rights reserved. JSDO 1
Benefits . Leverage Existing JSDO Deployment Business Logic 5 . Visual Mapping 2 Services . Increase Productivity, Quicker Time to Market . Flexible . Write Once, Deploy Everywhere
Other Web UI 4 3 Templates Frameworks
44 © 2014 Progress Software Corporation. All rights reserved.
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 Visit the Resource Portal
. Get session details & presentation downloads . Complete a survey . Access the latest Progress product literature www.progress.com/exchange2014