4 ms·
I might be going gray and crazy here, but surely you intended to ask: "why would anyone choose to re-invent the entire browser stack in Canvas instead of using
by akersten 5y ago
I might be going gray and crazy here, but surely you intended to ask: "why would anyone choose to re-invent the entire browser stack in Canvas instead of using the amazingly powerful, documented, understood, accessible, and performant document-rendering framework we've built over the last 30 years?"
Yeah, I've got no idea. If your first intuition when making a web-app is that you want to figure out how to custom render UI elements with subpixel anti-aliased fonts on an OpenGL surface and interface with screenreaders all on your own, you must be a PM at a large SV company with hundreds of bored developers whose KPIs measure only "how many more good things about the open Web can we ruin this month?"
Sorry, you've touched a nerve with this one :)
- mch82 5y agoI asked in a friend the same question & got this article in reply: “Google Docs switches to Canvas rendering, sidelining the DOM”, https://thenewstack.io/google-docs-switches-to-canvas-rendering-sidelining-the-dom/ https://thenewstack.io/google-docs-switches-to-canvas-render... So, no, I actually meant it as a real question and am curious what reasons people have. My suspicion is people aren’t aware of the Canvas API. People tend to use the technologies they know instead of taking a beat to look around and learn.
- speedgoose 5y agoGoogle docs has a very specific rendering system, and I'm not sure whether the full interface is using canvas.
- 1123581321 5y agoThe answer is still that relying on the benefits of the document model still makes sense for a lot of applications. It doesn’t matter whether a given engineer has experience with Canvas or not as much when the default choice (DOM) fits majority of use cases. Familiarity with Canvas API may actually endanger a project if an engineer advocating for it doesn’t understand the tradeoffs involved.
- mch82 5y agoAlso, I’d never advocate for using Canvas to replace HTML as a way to share text. I love web pages that work great as web pages, with artful CSS layouts. However, a lot of apps attempt to implement complex UI workflows as HTML forms and might do better with Canvas. And a lot of games seem like they could be implemented using Canvas so they’d run on the open web rather than as closed downloads distributed via app stores.