Progress® Data Objects: Guide and Reference
Total Page:16
File Type:pdf, Size:1020Kb
Progress® Data Objects: Guide and Reference Copyright Copyright © 2018 Progress Software Corporation and/or one of its subsidiaries or affiliates. This documentation is for Version 5.0 of Progress Data Objects. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Updated: 2018/05/16 Progress® Data Objects: Guide and Reference 3 Copyright 4 Progress® Data Objects: Guide and Reference Contents Table of Contents Chapter 1: Overview of Progress Data Objects, Services, and Catalogs.11 Run-time architecture and data access................................................................................................12 App development options.....................................................................................................................14 Progress Kendo UI support........................................................................................................14 NativeScript support...................................................................................................................15 Other UI support.........................................................................................................................16 Chapter 2: Using the JSDO dialect of the Kendo UI DataSource ...........17 Features of the JSDO dialect................................................................................................................18 Sample Kendo UI DataSource instantiations using the JSDO dialect..................................................21 Sample instantiation for an OpenEdge Data Object Service.....................................................21 Sample instantiation for a Rollbase Data Object Service...........................................................26 Chapter 3: Using the Progress Data Source for NativeScript and Angular......................................................................................................29 Chapter 4: Using the JSDO and the Data Source Modules in an Existing NativeScript App.......................................................................................35 Chapter 5: Using JSDOs to create mobile and web clients.....................37 What is new in JSDO 5.0?....................................................................................................................38 JSDO overview.....................................................................................................................................39 JSDO classes and objects.........................................................................................................39 How a JSDO maps to a Data Object resource...........................................................................40 How JSDO memory works.........................................................................................................41 Methods of the JSDO and JSRecord classes............................................................................45 Asynchronous and synchronous execution................................................................................49 Properties of a JSDO.................................................................................................................56 Requirements for using a JSDO................................................................................................57 Creating and managing access to a JSDO instance............................................................................60 Accessing standard CRUD and Submit operations..............................................................................61 Read operation example............................................................................................................64 Create operation example..........................................................................................................68 Update operation example.........................................................................................................73 Delete operation example..........................................................................................................79 Progress® Data Objects: Guide and Reference 5 Contents Submit operation example.........................................................................................................84 Accessing custom Invoke operations....................................................................................................90 Asynchronous vs. synchronous method execution....................................................................91 Invoke operation example..........................................................................................................91 Managing JSDO login sessions............................................................................................................96 Requirements for creating a JSDO login session......................................................................97 Using default web pages to support client app login................................................................100 Handling changes in session online status..............................................................................100 Using protected web resources................................................................................................103 Dynamic data binding for alternate client platforms............................................................................104 Using the UIHelper class..........................................................................................................105 Using a custom template..........................................................................................................107 Chapter 6: JSDO class and object reference..........................................111 progress.data.JSDO class..................................................................................................................112 progress.data.JSDOSession class.....................................................................................................126 progress.data.JSRecord class............................................................................................................135 progress.data.PluginManager class....................................................................................................137 progress.data.Session class...............................................................................................................138 progress.ui.UIHelper class..................................................................................................................144 request object.....................................................................................................................................148 Chapter 7: JSDO properties, methods, and events reference...............151 acceptChanges( ) method...................................................................................................................155 acceptRowChanges( ) method...........................................................................................................158 add( ) method......................................................................................................................................160 addCatalog( ) method (JSDOSession class)......................................................................................161 addCatalog( ) method (Session class)................................................................................................166 addItem( ) method...............................................................................................................................170 addLocalRecords( ) method................................................................................................................171 addPlugin( ) method............................................................................................................................173 addRecords( ) method........................................................................................................................177 afterAddCatalog event........................................................................................................................181 afterCreate event................................................................................................................................183 afterDelete event.................................................................................................................................185 afterFill event.......................................................................................................................................187 afterInvoke event................................................................................................................................188 afterLogin event..................................................................................................................................190 afterLogout event................................................................................................................................192