4 ms·
I'm gonna go out on a limb here and expose my n00bishness, and honestly a lot of that article has my head spinning as I google a lot of terms ;) I've only done
by duxup 7y ago
I'm gonna go out on a limb here and expose my n00bishness, and honestly a lot of that article has my head spinning as I google a lot of terms ;)
I've only done web development for a year now and I've seen some cool WebAssembly demos but mostly those are demos of various frameworks (or no framework) reusing random WebAssembly components.
It's cool, but I'm missing from a large web application stance how WebAssembly is supposed to work, specifically when it comes to stuff like you see in some frameworks with state management across components and etc. Is there an example of that?
- vcarl 7y agoWeb assembly is generally an optimization, not an app alternative. Think of it the way you would the C bindings Node.js has. If you've got a compute-heavy code path, writing it in C (or Rust etc) and shipping it as web assembly could be a dramatic perf improvement, but there's not really a substantive benefit to writing your entire app with it.
- petters 7y agoAnother benefit I suppose is that you can choose from many more languages. Whether that is substantive or not depends on the person, I guess.
- weberc2 7y agoThat's a use case, but there are many others, as the article mentions, like lightweight isolation for server side apps or writing your frontend app in a different language (not pragmatic today, but could be in the future).
- opencl 7y agoAnother benefit is initial page load times, if your page has a lot of JS it can take a pretty significant amount of time to parse it. i.e. Figma said it reduced page load times by a factor of 3, though they were using WASM to replace existing asm.js code. https://www.figma.com/blog/webassembly-cut-figmas-load-time-by-3x/ https://www.figma.com/blog/webassembly-cut-figmas-load-time-...
- asdkhadsj 7y ago> but there's not really a substantive benefit to writing your entire app with it. Amendment: Perhaps it's debatable what "substantive benefit" would be, but writing the whole app in it is a huge benefit if you really want to do that. That is to say, for years people wanted to write Web UI stuff in various languages, this also allows for that. So while the concrete performance boost may not be meaningful in writing an entire web app in C, Rust, Go, Python or w/e - to the developer happiness the boost may be huge for those devs that want it.
- vcarl 7y agoWell, you still can't do that—WASM doesn't have DOM bindings, you'd still have to ship out to JS. I believe that's a goal, so yes eventually that could be a benefit, but not at the moment.
- asdkhadsj 7y agoFwiw, you can - just perhaps with not pure WASM and perf. My next app I'm planning on using a Rust WASM DOM framework, and I know there are some in Go as well. This is primarily for developer UX.
- pjmlp 7y agoDOM bindings are kind of irrelevant when one has WebGL. One example among many ramping up https://platform.uno/ https://platform.uno/
- icebraining 7y agoI looked into their WebAssembly demo, but it doesn't seem to use WebGL, just a regular DOM (with an ungodly number of elements).
- pjmlp 7y agoThat was just an example, maybe not the best one. I should just have linked something done in Unity instead.
- Juliennng 7y agoMaybe that article can help about real world use case : https://tech.ebayinc.com/engineering/webassembly-at-ebay-a-real-world-use-case/ https://tech.ebayinc.com/engineering/webassembly-at-ebay-a-r...
- duxup 7y agoThank you.