JavaScript as 2th scripting option in perspective

Hi
As of fast growing javascript ecosystem and able to run on browser side, isn’t it nice to have to able write js code on perspective module as second scripting option?
Especially only for front end graphic part. (Not task that dealing with server side)
One good example is, user can import js library and use it directly in Perspective without to have to create module or using trick like web dev module combine with iframe.
Even for dragging and moving object event run locally on client and make it responsive. Unlike using python event that run in sever side and send back data to client, which cause you miss a lot of movement events because of slow connection.

When we have good a mount of hardware resource on client side why don’t we use it and put every thing on ignition server by using only python?

Right now IA team busy with adding new feature and components in perspective but when we have this option every user can simply import his component or use a lot of ready made ones directly into perspective. So this save dev team to focus on other part of platform.

The Perspective is clam to be a pure web solution, I believe this the only missing part.

2 Likes

I don’t know exactly how they have things set up in the background but this seems non-trivial for IA to do - allow two different scripting options per extension function, and these extension functions have to interact with each other usually - between two non-strong typed languages - I’m getting a headache just thinking about it. Not to mention another thing is that by both vision and perspective using jython, they can share functions - this is something my application does.

Not sure what you are referencing via Web Dev/iFrame for JS, but with a little web development knowledge you can always set up your own front end server. Having a front end server dishing out pages and a backend server dishing out data is a pretty standard web architecture now.

Use Ignition Web Dev as your backend API to expose the database and tag values that you want. Then in your ReactJS/VueJS/AngularJS(eww) front end server, consume your Ignition API endpoints for data. The benefits of this are complete granular control over your web page - no more drag and drop, just typing. Then you get the added benefit of being able to use version control like Git on your front end and it behaving in the usual manner.

1 Like

Adding user-facing front-end javascript as a feature wouldn’t only be non-trivial, it would be a nightmare from a support, training, performance, and stability point of view. This is not something we are keen on doing.

The module SDK is there for those who want to venture into these waters at their own risk.

3 Likes