Friday, March 26th, 2010blockquote>
This is Tom Preston-Werner of GitHub, from his recent posted about migrating the network graph functionality from Flash to Canvas.
This isn’t the first site to move over functionality, but Tom has a really interesting perspective on why he did this, what he likes about canvas, and what he wishes it had:
- Fewer lines of code and smaller deliverable size: Smaller code base and the compiled SWF file clocks in at 111k compared to the minified Canvas version at just 25k!
- Flash works badly on Linux (and friends)
- Inspectable/debuggable via browser
- No compilation step
- Better cursor handling
- No need to focus to receive keyboard events
- Have to handle clipping and redraw manually (SVG does better here too)
- No embedded font support
- No built-in multiline text wrap (painful for Bespin! ;)
- No HTML fragment rendering. Yes! drawElement, drawElement, drawElement. Please user agents!
Posted by Dion Almaer at 1:10 am