5 ms·
Large bundle sizes are not a consequence of creating UIs on the frontend, they are a consequence of bad practice. I have created plenty of purely frontend apps
by bfrydl 7y ago
Large bundle sizes are not a consequence of creating UIs on the frontend, they are a consequence of bad practice. I have created plenty of purely frontend apps that don't even approach 1 MB let alone 6 MB. In fact, most languages that can target WASM seem to produce enormous modules compared to a reasonable frontend JavaScript app. Rust is an outlier in my experience because of its minimal runtime.
It's also worth noting for example that only 1/5th of the data transferred when I load medium.com cold is their JavaScript, so WASM can't really help them either way.
- hu3 7y agoSubset of Go + LVVM = 4.1k wasm demo (2.3k gzip'd) Demo: https://richardanaya.github.io/wasm-module/examples/tinygo_canvas/index.html https://richardanaya.github.io/wasm-module/examples/tinygo_c... Article: https://medium.com/@richardanaya/hyper-efficient-front-end-development-with-web-assembly-using-go-and-llvm-8e6a1ccdd2bc https://medium.com/@richardanaya/hyper-efficient-front-end-d...
- bfrydl 7y agoI did not know about tinygo and this is pretty impressive. However, it is only a subset of Go missing a few features, most notably the fact that memory is never deallocated. Also, the equivalent JavaScript is still a fraction of this size. That's actually roughly the size of Preact, which implements nearly all of React.
- twoquestions 7y agoAgreed, though it's a lot easier for bad practice to happen with JavaScript than a lot of other languages, and frameworks like this (hopefully) will make for a larger 'pit of success'.
- austincheney 7y agoUuuggghhh, the baseless and ignorant JavaScript hate is a weak argument. It’s not any different than other baseless, weak, ignorant arguments; such as: ______ because _____(protected class) people. I am paid well to do no work, essentially on retainer, because it’s so common for people to dick this up and then blame the technology for one’s own incompetence. Like anything else it only requires a little bit of practice. Running screaming into the night only to bury your head in the sand behind the magnificent glory of favorite pet framework x isn’t practice. I describe this to nonprogrammers as hating on pianos because there is too much potential for bad music.
- heavenlyblue 7y ago>> I am paid well to do no work To be fair, working in this industry you could have been doing that without doing JavaScript :)
- bfrydl 7y agoI said it was bad practice that led to the large size of Medium's website, but only 20% of that download size is their application's JavaScript. In what way did the use of JavaScript make it “easier” for the remaining 80% of the download size to happen?