bolson: (Default)
bolson ([personal profile] bolson) wrote2009-12-31 01:11 pm
Entry tags:

Dynamic web graphics

Tinkering around with my clock projects, I've done an accidental survey of some tools for doing dynamic graphics in web pages.

This is a Java Applet using java.awt.* graphics:
http://bolson.org/clock/a2.html

This is javascript dom hacking pushing around HTML elements with CSS positioning (and a static png background):
http://bolson.org/clock/js.html

This is a <canvas> element with javascript graphics:
http://bolson.org/clock/epiclock.html

They're all updating at 10 to 30 Hz. I've found that the Java Applet/AWT looks great on my Mac but horrible on Linux, even if scaled back to 1 Hz. The two javascript clocks look fine on Mac, Linux, and iPhone. The Internet tells me that <canvas> isn't supported on IE, but it looks fine on Firefox/Chrome/Safari.

Alternatives not explored are XHTML + SVG + javascript, causing an inline SVG document to change and animate. Also Flash/ActionScript and Microsoft Silverlight and some new environment from Adobe are out there but not the kinds of things I'm likely to use for political reasons.

I still think Java is a great language, but it looks like Sun's promise of write-once-run-anywhere GUIs went out with the 1990's.

Also, I'm planning to watch one or more of these roll over this New Year's Eve. ;-)