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

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