Limitations of the Generic JavaScript View

Dear Knime-Community,

I currently work with the Generic JavaScript View Node to enable some Web features inside of the KNIME Server. 

I also build a repository to support the developement of Code inside of a Code Editor like Atom or VS Code: https://github.com/TarGue/GenericJavaScriptView-developing-files

I like the Node but there are some bottle-necks and I have some questions: 

Is there planned to support Typescript, ECMA Script 6 or JSX.

That would enable the development with React or Angular.js.

Did someone trie that? 

If yes, I would like to hear your experiences with that.

 

Is it possible to provide external libraries locally on a KNIME installation or a KNIME server and use them inside of the node?

How I have to code the require.js command to do that.

 

I don't know if it's possible but is there an idea how to use or integrate some node.js features in KNIME? 

I think that would enable also more features on the KNIME server, but I have no idea if there is a way to do something like that. 

 

I think the Generic JavaScript View, can be much more than only a tool to make own plots. It enables direct Front-End development on the KNIME-Server and this is great.

 

I'm looking forward to your answers and thank you,

Best regards,

Taras     

Hi Taras,

thank you for your feedback and interest in the Generic JavaScript view. A couple of remarks to your questions:

Is there planned to support Typescript, ECMA Script 6 or JSX?

In theory the node supports this already (at least from an execution point of view). The limitation is always the browser that is used to render the view. KNIME is based on Eclipse and so uses an SWT browser to display the JavaScript views. This has the limitation, that it uses always Internet Explorer on Windows, always Safari on Mac and always the WebKit installed on Linux machines. Internet Explorer obviously does not support ECMA Script 6. We are currently working on distributing a Chromium with the next KNIME-Windows release, which we will then use to display the views by default.
What you might be wanting though is syntax highlighting for Typescript and JSX. This is something that wasn't on our roadmap before, but I'll write it down in my feature list so that it might be considered for the future.
I have not heard of anyone who tried Typescript or JSX yet, but we have a client who is prototyping with AngularJS. If you're interested on getting started with that (it is a little tricky to bootstrap with requireJS) just shoot me a message again.

Is it possible to provide external libraries locally on a KNIME installation or a KNIME server and use them inside of the node?

This is something that is already on our roadmap, but is not part of the next KNIME release in December yet. The idea is that the library handling can be similar then in the Java Snippet node, where you can also provide your own Java library dependencies. There will be an option to embed the library with the node, or to provide the information needed to load a library from a CDN without the need to explicitly write the config for requireJS in JavaScript anymore.
Another thing that you can try is to copy the JavaScript library inside the workflow directory on your local file system. Then in your workflow use the knime.workflow flow variable to resolve the local system path and append the path to the library. You can then feed this flow variable in the Generic JavaScript View and use it in the requireJS config. I remember setting up a workflow like this before, so it was self contained. I have to do some digging, but if you're interested I can try to find it and post it here.

I don't know if it's possible but is there an idea how to use or integrate some node.js features in KNIME?

So far there is no plans to integrate node.js in the KNIME server. If you have a concrete use case for this, I would like to hear it though.

I hope you found this helpful.

Best regards,
Christian