iModernize - The Profound Logic Software Blog

Profound Pro Tip: 4 Fundamental Concepts of Using Profound.js and Node.js

Posted by Tim Losee on Oct 3, 2018 10:23:17 AM

Profound Pro Tips is a blog series focused on issues that our support team receives and questions our Profound Logic customers have. Don't see your question/concern in Profound Pro Tips? Please feel free to contact our team or leave us a comment below. 

Today’s Topic: Fundamental Concepts of Using Profound.js and Node.js

If you haven't heard by now, Profound.js is Profound Logic's solution for Enterprise business application development using Node.js. It brings together client-side and server-side development technologies, allowing developers to build database-driven business applications quicker than ever before.

By utilizing Node.js, Profound.js can extend your applications to open-source technologies, opening your business up to endless possibilities. Below are the 4 fundamental concepts of Profound.js:

1. Creating Node.js Modules as ILE Programs

Creating Node.js modules that act like ILE programs is one of the main purposes of Profound.js. Using Profound.js, you can call these modules directly from your existing applications. These programs can have either in-put parameters or out-put parameters that can be passed by reference. 

Capture1
(Figure 1)

2. Passing Parameters In and Out

After creating a Node.js module that can be called from your existing application, you can then pass parameters in and out of those modules. A proxy program is typically used to help pass information along to Node.js (see Figure 2).

Capture2
(Figure 2)

3. Using NPM Packages

Profound.js allows you the use of NPM packages to connect to the outside world. NPM is a package manager for the JavaScript programming language and is the default package manager for the JavaScript runtime environment Node.js. There are hundreds of thousands of packages that can do almost anything you may require including connecting to a sequel server data base (Figure 3). The possibilities are endless!

Capture3
(Figure 3)

4. The Use of Fibers

The documentation for most NPM packages show that the data comes back into a "call back," which is a separate function that receives the output. These asynchronous "call backs" work very well within most scenarios, including event driven applications, but aren't great for transaction business applications. Fibers allow you to get rid of the "call backs" and turn those asynchronous API into more of an easy to call code.

Capture4
(Figure 4)

Below you will see a working example of a business application that uses a simple CL program that prints an invoice and how Profound.js can dramatically change how you use the data with these 4 fundamental concepts:

Topics: Node.js, Profound.js, IBM i applications, IBM i, RPG Development, RPG, Application modernization, AS400 modernization, IBM i Modernization, Agile modernization, Profound UI, iSeries, AS 400, AS_400, Profound Logic, Legacy Modernization

Subscribe to Blog Updates

...and get The 2017 State of IBM i Modernization White Paper FREE!

cover page.png

Recent Posts