Every time I talk to a customer, I learn about great new use cases for calling web services from IBM i applications or calling IBM i functions from open source. What I have found is that although RPG is a much better language for business applications, JavaScript is the right language for web services. Customers who have built their web services and their web service calls in JavaScript are able to develop, secure and maintain them with dramatically less effort than those who are writing the services in RPG.
For example, I was just working with a medical company that needed easy access to millions of archived documents directly from their IBM i applications. Recent documents were stored on the IBM i while the older documents were backed up to tape. Storing documents on the IBM i was expensive but finding them on archived tapes was difficult and time consuming. He said, “If you could give me an easy way to access all of those documents from low cost cloud storage, that would be great!”
With just a brief web search, we were able to find prebuilt components for connecting to Cloud providers like Amazon, IBM and Microsoft that made it simple to retrieve documents from storage. Those components were all built in JavaScript. We used Eradani Connect to connect their RPG code directly to the JavaScript components and within minutes had a functioning system in which their RPG application was locating and downloading documents from the Cloud.
We had another customer who was using Basic Auth (yikes!) for authenticating incoming web service calls. They were concerned about all of the security vulnerabilities (see my upcoming blog) that Basic Auth introduced into their IBM i environment and wanted to move to something more advanced. By moving their web service to JavaScript, we were able to download the required components for the OAuth2 framework and immediately upgrade their security. There was no need to write a new security layer in RPG.
By using JavaScript for your web services, you are using the right tool for the job. While RPG is a great language for transaction processing, JavaScript is built for web services. By using JavaScript, you will be more productive, more secure, and more responsive to the emerging opportunities available through the use of web services.
If you would like to learn more about how to get started with JavaScript web services for your IBM i, checkout our upcoming free webinar on Wednesday, September 23rd at 11 am PDT/2pm EDT. Register here at: https://eradani.com/using-apis-to-empower-your-rpg-webinar/