Tech Articles


API Enablement - Code Samples from CodeXchange


In this article you will find a list of Code Samples related to API Enablement of your PowerBuilder apps. These code examples are found at Appeon's CodeXChange.

 

**The list has been ordered from newest to oldest.

API Enablement Apps from CodeXChange
Name Description

JSON Enhancements sample code from Elevate 2020

(Download)(CodeXchange)

Demonstrates

DataWindow Row Level Import/Export
Enhanced JSONGenerator
Enhanced JSONParser
Enhanced JSONPackage

[PowerBuilder / JSON / DataWindow]

REST Client Enhancements sample code from Elevate 2020

(Download)(CodeXchange)

Demonstrates:

RetrieveOne method – For REST methods return one row
Submit method - sends request and returns data in one operation
SetRequestHeader behavior modified
GZIP compression handled automatically
Get and Set OAuth token (using Twitter)
Get and Set JWT token ( using AirMap, DocuSign and Salling Group )
Send[Method]Request, where method can be Get, Put, Post, Patch, Delete

[PowerBuilder / RESTClient]

WebAPI JSON to DataWindow

(Download)(CodeXchange)

This sample shows how you can interacts with WebAPI addresses by calling the HttpClient and JsonParser objects.

Development Requirements:
IDE: PowerBuiler 2017 R2 or above

[PowerBuilder / HTTPClient / JSONParser]

Using Dropbox REST API from PowerBuilder Code

(Download)(CodeXchange)

Attached is the code behind the 5/22/2019 webinar:
www.appeon.com/developers/library/videos...pi-powerbuilder.html

Code is PB2017 R3
Requirements: Must have a dropbox user account. The nvo and datawindows should be able to be re-used. Hope everyone enjoyed the webinar. Feel free to contact me for freelance work, specializing in OAuth/REST integration.

[PowerBuilder / RESTClient]

Two Factor Authentication

(Download)(CodeXchange)

Sample code showing how to do two factor authentication using PowerBuilder

[PowerBuilder / HTTPClient]

OAuth Code & Token Example

(Download)(CodeXchange)

PowerBuilder supports getting secured data from the OAuth 2.0 authorization server. The Bearer access token is supported, and the following grant types are supported:
• Authorization Code
• Implicit Flow
• Client Credentials
• Extension (or Refresh Token)
• Resource Owner Password

[PowerBuilder / OAuthClient]

u_json Object oriented JSON in PB

(Download)(CodeXchange)

JSON handling in PowerBuilder is fine to handle relational data, as long as it comes in the format defined by Appeon. But often, we need to work with data from an external interface, that’s where u_json comes in handy: You can parse, manipulate and/or generate all JSON files with the same object, in a true object oriented way.

From GitHub (author: Georg Brodbeck):
github.com/informaticon/inc.win.base.pb-json

[PowerBuilder / JSON]

Unit Testing sample code from Elevate 2020

(Download)(CodeXchange)

Unit Testing sample code from Elevate 2020

[SnapDevelop / xUnit Testing]

DataWindow Converter sample code from Elevate 2020

(Download)(CodeXchange)

DataWindow Converter sample code from Elevate 2020

[SnapDevelop / DataWindow Converter]

Web API testing demo from Elevate 2020

(Download)(CodeXchange)

Web API testing demo from Elevate 2020

[SnapDevelop / Web API Tester Tool]

PowerScript Converter demo code from Elevate 2020

(Download)(CodeXchange)

Demonstrates how to use the PowerScript converter to create C# from PowerBuilder code. Particularly focuses on database interaction:

dwModify
Embedded SQL Statements
Embedded SQL Stored Procedure Calls
Embedded SQL Cursors
RPCFUNC Stored Procedure Calls

[SnapDevelop / PowerScript Converter]

Benchmarking PowerServer w/ and w/o WebAPI

(Download)(CodeXchange)

This demo shows how to call Web API from PowerServer.
It compares the significant difference in performance between a PowerServer app performing multiple "interrelated" server calls via DW Retrieve and SQL Cursors, and same PowerServer app that instead calls REST API handling C# Datastore retrieve and SQL operations on its own (via objects provided by SnapObjects.Data, such as SQLBuilder and SQLExecutor).
To this purpose, C# Web API helps solve performance issues in PowerServer heavy scripts and multiple roundtrips to DB.
Complex Business Logic is transferred to the server, while keeping PowerServer as the most effective solution for migrating PB apps to the Web and Mobile platforms with little effort.

[PowerServer Web / Web API]

Call a Web Service and Use a Web Service with a DataWindow

(Download)(CodeXchange)

This demo shows how to call Web services from PowerBuilder and PowerServer respectively using the SoapConnection and AppeonWebServiceComponent objects. It also includes sample code on using a Web service as the data source for a DataWindow and how to create a Web service from PowerBuilder.

[PowerServer Web / SoapConnection]

Export Data From a DataWindow to JSON and Import JSON Data to a DataWindow

(Download)(CodeXchange)

This demo shows how to implement JSON data import and export functions to a DataWindow with the eon_cjsonnode and eon_cjsonnodearray objects provided in appeon_workaorunds.pbl.

[PowerServer Web / JSON / DataWindow]

Comments (0)
There are no comments posted here yet

Find Articles by Tag

Menu PowerBuilder SVN SnapObjects OLE Excel Class Mobile Testing RESTClient Database Profile Linux OS Migration PDF CI/CD Web Service Proxy Service Messagging External Functions JSONParser DataWindow JSON Database Painter WinAPI SqlModelMapper NativePDF Charts HTTPClient Data SQL JSONGenerator Validation Transaction File Import JSON Expression SqlExecutor ActiveX PowerBuilder Compiler Window SQL Server SnapDevelop Icon Application Export PostgreSQL ODBC driver TortoiseGit Encryption Graph 32-bit Bug Text DataWindow Source Control UI Themes Performance 64-bit Design Event Handler Windows OS .NET DataStore Automated Testing Branch & Merge OAuth API Source Code TLS/SSL DLL OrcaScript Authorization Database Table Data TreeView PostgreSQL Export JSON Authentication Encoding XML Windows 10 Icons iOS CoderObject Elevate Conference Stored Procedure RibbonBar Builder UI Modernization TFS ODBC Resize Debugger UI Interface DevOps Azure Installation Oracle Variable Event Handling PBDOM Model Configuration SDK Git C# Debugging GhostScript Event Database REST Script Outlook Error Deployment WebBrowser Debug .NET Std Framework COM Repository Open Source BLOB Android OAuth 2.0 Web API PowerServer Mobile Trial Database Table CrypterObject IDE PowerBuilder (Appeon) License PowerServer Web RibbonBar InfoMaker Import JSON Filter Platform PFC DataType PowerScript (PS) Jenkins MessageBox DragDrop Database Table Schema Syntax SOAP Database Object RichTextEdit Control Sort Array PDFlib .NET Assembly Database Connection