Company
Date Published
Author
Tom Preston-Werner
Word count
1543
Language
English
Hacker News points
None

Summary

Two years after initially developing the Network Graph using Adobe Flash due to its familiarity and the limited support for alternatives like Canvas and SVG at the time, the author decided to rewrite the application using JavaScript and HTML5 Canvas in response to the improved browser support for Canvas and the impending release of Apple's Flash-less iPad. Despite initial concerns about JavaScript's capacity to manage complex code, the transition proved successful, with the Canvas version requiring fewer lines of code and delivering better performance. The author highlights several advantages of Canvas over Flash, such as simpler debugging, no need for compilation steps, and better cursor handling. However, drawbacks include the need for manual clipping and redrawing, lack of embedded font support, and multiline text wrapping challenges. Despite these limitations, the author views Canvas as the future of web graphics, advocating for its use wherever possible, especially as Flash's relevance diminishes with the advent of devices like the iPad.