Jay Braun
7/29/2015 11:00:00 PM
I have been asked to modernize the graphics of a legacy project so that it can be viewed in a browser, and I think SVG with Javascript might do the trick. Just need a couple of pointers.
This old application, a simulation model, outputs a description of various objects to be depicted graphically on a remote workstation. The application itself has no graphical capabilities, and no internal tracking of updates. It simply dumps a snapshot every few seconds.
The "dump" is in a custom format, but the information can easily be described with SVG. I don't need any help with that, and have produced one sample snapshot in SVG and displayed it in a browser. Piece of cake.
Here are my questions:
1) How can I get a browser to process SVG (or any XML for that matter) that is coming in via a TCP socket? (I'd like to stick with TCP since the legacy application already has code to use that protocol.) I expect that Javascript or some other programming capability can help here; can you point me to a reference?
2) I need to "clear" the display when a new dump begins, and draw the brand new dump. Any thought on how to do that?
3) I will eventually need some event handling, especially mouse clicks.
Thank you for your recommendations.
Jay