by pier25 · 1y ago · 0 comments
WASM enables certain use cases like using FFMPEG in the a browser or game engines running on canvas which are super cool. But for 99.99% of DOM related functionality, JS is really the way to go.
Edit:
Here's another example. Loads and executes like 10MB of WASM code for something that could be done in 100kB of JavaScript.
While I think it's a bit of a stretch to say it'd be 100kB JS (the app does a LOT of client-side lifting, so it'd definitely take more than that), otherwise you're right - WASM, specifically Blazor, is heavy. It's a bunch of download and non-ideal start time.
The reason I use Blazor here is that I work on this website alone, as a hobby project. This means I prefer to use tech (C# and .NET) I like to use instead of going lenghts learning additional frameworks. It also enables server and client share same code in places, so it can be used both in client and on server without having to program it twice. The website wouldn't be even nearly as feature rich if I had made it in JS.
The point I am making - I'd not advise Blazor use for every app, and if you already are familiar with JS frameworks, they're a good (or even better) choice. However WASM and Blazor has niches outside of "I do super fancy stuff" websites. It makes rich website development possible for backend devs and other people familiar with other technologies. It's good to think outside of the box sometimes.