I'd like to create an interactive animation like what Visual Thesaurus offers. I'm evaluating the different technologies I could adopt, and I was wondering what are the pros and cons of implementing a graph visualization in a Java applet with Swing or in HTML5 with its canvas (I know only their name)
I know Java and a little Javascript, and I'd like to avoid proprietary technologies
edit: Most important of all: do HTML 5 canvas support event listeners, as it seems to me Swing does?
I'd go with RaphaelJS http://raphaeljs.com/ it's a really nice Javascript graphics library. It's not HTML5(canvas) based, it uses vector SVG(& VML) graphics instead, but it will work on most browsers (even older IE). If you want built-in charting see http://g.raphaeljs.com/
Plus, and this is a major plus, you won't be restricted to using applets.
Here's some raphaelJS examples:
http://raphaeljs.com/graffle.html
http://raphaeljs.com/curver.html
With Java you can use prefuse so you will save a lot of time. I don't know if there are similar api's for html5 but if don't, you'll have to write it yourself.
Here is an example using prefuse
The pro is that you dont have to deal with incompatibility issues between browsers. The con is that the jvm may not be installed on the client machine.
You also have to take into account your proficiency in each technology.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With