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

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