You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks for your approach using plain standard javascript only. I really appreciate that and I think it is very helpful in long term support applications.
In my projects we are visualizing machine data in an ui. We are currently using javaFX and have to provide a web-ui in near future, for which we want to build a javascript-application. For us the main benefit of FX is databinding, esp because we have to deal with complex model objects. What do you think, how do you implement a two-way-databinding using plain javascript?
In practice a machine has a name, some main data and a set of sensors with number and data. An example json of a machine might be
{"name":"testMachine","main":{"valueA":47,"valueB":11},"sensors":[{"gauge":42,"sensor":12},{"gauge":3.14,"sensor":18}]}
The machine has a rest service to read and change main data, to read, add and remove sensors and to change some of sensor values. It also offers a web socket that pushes messages whenever sensors change (add, remove, change value).
The js-app visualizes that machine. It shows gauges with current sensor values and their variation in time. Even some meta-gauges that show calculated values. Further it offers input fields and submit-buttons to change the main and some sensor data.
In js-code we would like to have a single model-var with the machine data. We would like to bind that model with the web-socket,
the rest-calls and the several ui-dom objects.
How do you do that in plain standard js without ending up in a event-listener-hell?
Moin Adam,
thanks for your approach using plain standard javascript only. I really appreciate that and I think it is very helpful in long term support applications.
In my projects we are visualizing machine data in an ui. We are currently using javaFX and have to provide a web-ui in near future, for which we want to build a javascript-application. For us the main benefit of FX is databinding, esp because we have to deal with complex model objects. What do you think, how do you implement a two-way-databinding using plain javascript?
In practice a machine has a name, some main data and a set of sensors with number and data. An example json of a machine might be
{"name":"testMachine","main":{"valueA":47,"valueB":11},"sensors":[{"gauge":42,"sensor":12},{"gauge":3.14,"sensor":18}]}
The machine has a rest service to read and change main data, to read, add and remove sensors and to change some of sensor values. It also offers a web socket that pushes messages whenever sensors change (add, remove, change value).
The js-app visualizes that machine. It shows gauges with current sensor values and their variation in time. Even some meta-gauges that show calculated values. Further it offers input fields and submit-buttons to change the main and some sensor data.
In js-code we would like to have a single model-var with the machine data. We would like to bind that model with the web-socket,
the rest-calls and the several ui-dom objects.
How do you do that in plain standard js without ending up in a event-listener-hell?
Thanks, and greetings from Hamburg!