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

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