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

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