Now SDK Questions

Jan F
Tera Contributor
Hey there,

I was very curious when reading about the Now SDK in the Washington release and tested several use cases.


Questions:
1. The pages
 
and
 
suggest that I can create one app (lets name it App A) that I can implement with logic using the Now SDK whose logic is then exported and can be used in another scoped app (lets name it App B).
 
Is the assumption correct ?
 
While App A is created with the Now SDK, App B is only created on the instance with script includes.
Is it possible to call the exported logic from App A ? What is exactly necessary to make that happen ?
 
For the documentation it would be good to explain this with realisitic examples from an instance. In the example there is always the example of a "math" application.
It would be good to see how the exact math application would look like including exports and the exact way of reusing the logic in another app. Also it would help to show the whole construct with the modules imported in the math app especially as other scoped apps.
If it is not explained another good way to show case this would be to provide two apps as examples either downloadable as ZIP or on Github.
What I wouldn't understand is if I have to "npm install" App A in App B to reuse the logic as both apps would be on the instance.

2. It seems as if there are size limitations regarding third party libraries ? What is the limit ? Is it configurable ?

3. The Now SDK has a nice CLI. The usage is defintely better than the previous CLI tools.
However it's the third CLI tool published from ServiceNow in the NodeJS Ecosystem ? Are there any plans to integrate it into the ServiceNow CLI as it already provides "modules" to be integrated ?
1 REPLY 1

Jan F
Tera Contributor

I had some exchange with Now SDK Developers in person and received the following feedback.

 

1. Currently it is not possible to create a module with the Now SDK for one scope and use it directly in another.

You would have to create a script include in the scope with the module and provide calls to the module via the script include to the module (meaning every function provided by the module) needs to have a function in the script include. This might change in the future but it's not guaranteed.

 

2. This is might be analyzed. Will ask again for this topic.

 

3. Also not safe but possible that the CLI tools might be merged in the future.