Chris Ringer
Chris Ringer has been coding in RPG since 1989, focusing primarily on order fulfillment, pharmaceutical and manufacturing environments. In his spare time he enjoys running and doing triathlons. “I’m not fast, usually placing in the middle of the pack, but we’re just as competitive back there.”
-
Guru: Web Concepts For The RPG Developer, Part 4
October 21, 2024 Chris Ringer
The final article in this series is about the JWT (JSON Web Token). If you wish to review the previous articles, you can drill back from part three. For unattended machine to machine (M2M) processes, a JWT string is a formatted container for requesting access to a resource server. I think of a resource server as the applications. And in our case, the JWT has an asymmetric signature.
But really, what is a JWT? It’s similar to a temporary driver’s license. Think about your last visit to a hotel (figure 1).
Steps:
- You present your ID (JWT) during check-in
-
Guru: Web Concepts For The RPG Developer, Part 3
July 22, 2024 Chris Ringer
Greetings everyone. Articles part one and two were both an introduction on how to build components in an HTTP request. In part three, we will begin to connect the dots and discuss how to asymmetrically sign a simple string. If you ever need to send a secure HTTP request to a government agency or financial institution, you likely will authenticate with a signed token. So, here we go!
Base64 Take Two
In part one, the SQL scalar function BASE64_ENCODE embedded in RPG converted a string to base64. This technique will cover most use cases, but what if you need …
Read more -
Guru: Web Concepts For The RPG Developer, Part 2
June 10, 2024 Chris Ringer
Hello again! Part 1 of Web Concepts for the RPG Developer was an introduction on how to build components in an HTTP request and I hope you enjoyed it. Part 2 is just a continuation of that vast topic because there is so much to learn. I encourage you to click on the links in this article and explore on your own too.
JSON
A web API endpoint may require the data in the body of an HTTP POST request to be constructed as JSON (“jay sahn,” short for JavaScript Object Notation). JSON is formatted text (a string) containing key:value …
Read more -
Guru: Web Concepts For The RPG Developer, Part 1
April 22, 2024 Chris Ringer
Way back in the 1990s, I recall accessing data with only RPG III F-Specs. But nowadays some of that critical data may live in the cloud. The good news is tools like HTTPAPI and RXS and SQL functions like SQL HTTP are available to access that remote data from the IBM i. But what you may not know is how to actually format components in those HTTP requests.
Here I will discuss some techniques to build those components in an HTTP request before sending it across the web.
HTTP Get Versus Post
The two most common methods for an HTTP …
Read more -
Guru: Preamble Comments
April 15, 2019 Chris Ringer
Do you remember what you ate for lunch two days ago? If you’re like me, you had to think about it for a minute before answering. Now imagine trying to recall the detailed requirements of a few programs you wrote a year ago so you can modify them for a new project. Or better yet, what if someone else like a retired employee or a traveling contractor coded these programs? At this point you may become very dependent on any comments they left in the code.
It’s been said that any time spent commenting on your code now might save …
Read more -
Guru: The PHP Path To Victory, Part 2
August 7, 2017 Chris Ringer
Part 1 of this article discussed the path a PHP request takes on its way to your backend RPG program through the magic of an external SQL stored procedure. You may need to review the SQL, PHP, and RPG code there before continuing here. If you have not yet downloaded the code to your IBM i (found in Part 1), now would be a good time to do that.
Part 2 will give you the confidence to troubleshoot those times when something unexpected occurs in this PHP environment. And if you are a developer for large company, the responsibility of …
Read more