Appeon CodeXchange

Appeon CodeXchange

 Appeon has now fully resurrected the CodeXchange side of PowerBuilder-related resources for the developer community under the new Appeon Community website. Previously, the CodeXchange code samples were loosely housed underneath the main Appeon Website and “read-only”, which was not conducive for expanding the code examples, exchanging ideas about a particular code sample, or easily find code samples of interest. These limitations have now been addressed by housing the CodeXchange under the new Appeon Community website, as follows:

The new CodeXchange home allows for a much better code sample navigation and searching experience.  It is better structured around the programming language and deployment targets you are interested in. It is easy to see if there are any new items and when the most recent activity occurred.  You also have an advanced search functionality by clicking the “Search Code” button, as follows:

Figure 1- Advanced Search

When viewing a particular code sample, the new CodeXchange area now allows you to interact with the author and fellow developers. You can exchange ideas about or discuss the code sample by posting a reply.  For example, you may want to ask the author a question or you may have suggestions for other Appeon Community users how to benefit from this code sample.  And you can easily share the code sample with anybody by using the various sharing options, such as: email, Twitter, Facebook, Google, etc. interactions, as follows:

      

Read More
  3068 Hits
  0 Comments
3068 Hits
0 Comments

Base64 – Your New Binary Friend

Base64 – Your New Binary Friend

PowerBuilder’s Web Service prowess has increased significantly in recent releases from Appeon - in particular, PB2017 R2 and R3 release. These PowerBuilder releases have given us a new HTTP Client and RESTful Client capabilities that can utilize the newer JSON (JavaScript Object Notation) data format and the ever-popular XML (Extensible Markup Language) data format as well. When processing standard data type information in either the JSON or XML format, the ease of data exchange is very high. However, when trying to transfer binary data, the JSON and XML formats and the supporting HTTP transport layer for RESTful web services will not readily handle binary data.

To address this binary dilemma in the JSON and XML realm, today’s applications utilize the Base64 binary-to-text encoding mechanism to convert binary data into ASCII text sequences of the data. This allows the converted data to be injected into the JSON or XML schema and transmitted without upsetting the HTTP transport protocol. While it does increase the overall transmission data length when utilizing this encoding scheme, it is necessary in order to achieve the end goal of data exchange with these technologies.

In PB2017 R3, PowerBuilder will be updated to include new functions to both encode and decode binary data to and from the Base64 encoding scheme. The new PB built-in Base64Encode and Base64Decode commands can now perform the encoding in and out of the Base64 scheme using the standard PowerBuilder run-time engine support. For example, the PB Base64 PNG image used in this article would look like the following in a hexadecimal editor:

Figure 1- PowerBuilder Base64 Image in Hex

Using the new built-in Base64Encode method, the PNG image binary data is converted into a set of ASCII character sequences which can now be easily transmitted or even read by a simple text editor, as follows:

Read More
  4082 Hits
  0 Comments
4082 Hits
0 Comments