Live data from Hacker News

You might want to build your WebApp in Canvas instead of HTML

hivekit.io

21–30 of 59 posts

Re: You might want to build your WebApp in Canvas instead of HTML

#22
post #9

Canvas is a last resort if you absolutely cannot build the thing any other way. When you use canvas you're giving up on not just accessibility but also optimizations that the browser does for you transparently when you use the native render tree. There's no guarantee that your app will be faster in canvas, it could easily be slower. Do you really think you can beat the browser's C++ by writing code in a language that…

Can WASM write to Canvas though?

Re: You might want to build your WebApp in Canvas instead of HTML

#23

I’m always curious how Google, Microsoft and Co. build their web apps - given that they need to work well on any computer, from a top-shelf speed machine to a potato with wires. In my experience, Microsoft webapps (which now includes many of their desktop apps) are rather sluggish. Even the Copilot Chat website. How hard could it be to make a chatbox and a session transcript not be sluggish?

Chatgpt makes teams feel like an optimized app. The azure website makes everything else feel like it's been optimized.

Especially in the era of AI, performance has been thrown out of the window

Re: You might want to build your WebApp in Canvas instead of HTML

#24
post #3

Not a word in here about accessibility, of course. If you’re blind you’re blind to the canvas as well without a lot of work, it’s much more straightforward to make the DOM accessible

Yep. Accessibility isn't just a nice to have. Its a legal requirement for a lot of websites under the ADA (Americans with Disabilities Act).

Re: You might want to build your WebApp in Canvas instead of HTML

#25

I’m always curious how Google, Microsoft and Co. build their web apps - given that they need to work well on any computer, from a top-shelf speed machine to a potato with wires. In my experience, Microsoft webapps (which now includes many of their desktop apps) are rather sluggish. Even the Copilot Chat website. How hard could it be to make a chatbox and a session transcript not be sluggish?

YouTube is a half working disaster.

Re: You might want to build your WebApp in Canvas instead of HTML

#26
post #9

Canvas is a last resort if you absolutely cannot build the thing any other way. When you use canvas you're giving up on not just accessibility but also optimizations that the browser does for you transparently when you use the native render tree. There's no guarantee that your app will be faster in canvas, it could easily be slower. Do you really think you can beat the browser's C++ by writing code in a language that…

Can WASM write to Canvas though?

You need some JS in the middle but yes, you write your image to a buffer and share it with JS, then in the JS you put it in the canvas.

Re: You might want to build your WebApp in Canvas instead of HTML

#27
> So don’t choose Canvas simply because it sounds fast. Choose it when your interface no longer behaves like a document and starts behaving more like a scene.

Unity can literally deploy scenes to web canvases with its webgl target.

If you are going to use canvas, why not use the most extreme form of it with the most complete tooling available? You can put the universal render pipeline in anyone's browser in 5 minutes. These deployed web assets are surprisingly small if we are responsible with art.

Accessibility is even an option because we are leveraging a gigantic corporate engineering team and actually have time to try and solve this rather than reinventing basic layout and rendering concerns.

https://github.com/mikrima/UnityAccessibilityPlugin

Re: You might want to build your WebApp in Canvas instead of HTML

#28

I call this the bluebox problem. Back when I worked for SAP there used to be this control called the bluebox control that embedded a browser (shdocvw) into a C++/MFC app. Almost every single annoying UI bug came from that control. I see the same now in the other direction. Every 5 years we come up with the bright idea to use browser as a distribution engine for a UI surface that is rendered by a box. This has histori…

I’m pretty sure Google Sheets transitioned to this type of thing and it has been successful

Re: You might want to build your WebApp in Canvas instead of HTML

#29
post #9

Canvas is a last resort if you absolutely cannot build the thing any other way. When you use canvas you're giving up on not just accessibility but also optimizations that the browser does for you transparently when you use the native render tree. There's no guarantee that your app will be faster in canvas, it could easily be slower. Do you really think you can beat the browser's C++ by writing code in a language that…

You’re not “giving up” on accessibility. You’re just not getting it “for free” — though it was never free to begin with.

When you’re dealing with things like spreadsheet viewers, disengaging from the DOM for sighted users can actually make accessibility simpler.

Re: You might want to build your WebApp in Canvas instead of HTML

#30

I’m always curious how Google, Microsoft and Co. build their web apps - given that they need to work well on any computer, from a top-shelf speed machine to a potato with wires. In my experience, Microsoft webapps (which now includes many of their desktop apps) are rather sluggish. Even the Copilot Chat website. How hard could it be to make a chatbox and a session transcript not be sluggish?

Most Microsoft web apps are sluggish and horribly designed.

I was using Entra and Azure the other day and boy are they slow and clunky.

Post reply on HN