iModernize - The Profound Logic Software Blog

Profound Pro Tips: Profound.js API Intellisense in Visual Studio Code

Posted by Tim Losee on Jun 11, 2018 3:56:28 PM

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: How to access the Profound.js API via Intellisense with Visual Studio Code.

Keep reading to learn more....

As of Profound.js 4.2.8, when you are developing with Visual Studio Code you will now have access to the Profound.js API via the Intellisense. If you are unsure what the Intellisense is, it is a tool used to help you understand references in your code. For example, when you are writing JavaScript, it can list available functions, variables, and many other things. Intellisense is also known as a content-assist. 

Step one to utilizing Intellisense and to find all references to your APIs when writing in your Profound.js module, you must require the 'profoundjs' module in your script like in the example below:

Pic 1
(figure 1)

After that, any time you reference the 'pjs' namespace VSCode will prompt you with a list of Profound.js methods available for you to use (See figure 2). VSCode will also show you their parameters and a short description of the API.

Pic 2(figure 2)

VSCode is especially helpful when working with the Profound.js SQL API's. The 'pjs.prepare()' API returns an object which has more functions and in an object-orientated world, you could compare the 'prepare' function to a constructor and the return object being a new class with methods. 

Pic 3
(figure 3)

When you reference the object (class), you will get a list of methods available from within that object. As you start to type the list of parameters, VSCode will tell you what the parameter type is and also give you a detailed description of that parameter type.

Pic 4                     (figure 4)

Hopefully this easy-to-use tool can help you when developing your code in Visual Studio Code.

*NOTE: To be able to use the Profound.js API through Intellisense with Visual Studio Code, you must have Version 6 of Profound UI downloaded. *

Click the link to get started with Visual Studio Code.

Learn how to Make Modern Applications That You Will Love With IBM i RPG and Node.js with Profound UI and Profound.js! Watch the replay of this webinar hosted by Alex Roytman and Liam Allan TODAY!


 

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