Vector Graphics on the Browser

Back in 2000, when SVG was just coming out, I hoped that it would become an ubiquitous standard within a year or two. Now I know better than to think that Microsoft would adopt any standard that didn't originate in Redmond. Thank goodness IE was a minority browser when JavaScript became popular. Just think how crippled the web would be if this were not the case. Today, SVG is supported by the major non-IE browsers, while Microsoft has maintained it's own VML technology. It turns out that SVG and VML have similar-enough models that it is possible to write a common JavaScript API that can use either of them.

Enter Raphael, JavaScript library for creating vector graphics. From the work that I've done with it so far, it appears to be effective and nearly stable. The website and documentation is clean and easy to follow. The library has some rough edges though, and the source code is pedantic. Examples include the variable E, assigned to an empty string, whose name means just that-- "empty string", or the variable math that is assigned to Math. Apparently the author is protecting his code against changes in JavaScript's built-in object names. The resulting code is puzzle for the reader, a great mystery to solve.