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.
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).
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.
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: