12 ms·
Webpack? JS compilation? I don't know what either of those things are and I don't know why you'd use them instead of plain HTML and CGI (maybe FastCGI or mod_p
by torstenvl 4y ago
Webpack? JS compilation?
I don't know what either of those things are and I don't know why you'd use them instead of plain HTML and CGI (maybe FastCGI or mod_php if you really want to get fancy).
I think what GP is asking is: for those of us who don't follow the latest web development trends, what's the inherent value to this? it isn't clear to an outsider what distinguishes this from just the latest fad?
EDIT: I see that webpack is a tool to simplify bundling of JS modules and dependencies in large scale JS projects
- e63f67dd-065b 4y ago- Transpilers: sometimes you need to support old browser versions but want to use newer features - Typescript: one but lesson we’ve learnt over the years is that vanilla JS sucks and when your codebase grows into the >10k loc range it becomes a nightmare without engineering and tools like the typescript compiler - minification: minify your JS, HTML, and CSS - state synchronisation: a big problem with the jquery days was desync, modern web frameworks make it very easy for state and ui to stay in sync - one codebase for web, electron (desktop), mobile (react native). Whether this is a good or bad thing is left as an exercise to the reader - lots more I’m forgetting. For better or for worse, that’s the modern JS toolchain, plain HTML with some JS sprinkled on top just doesn’t cut it for modern webapps anymore
- torstenvl 4y agoI don't follow. Which older browsers? If they're new enough to support WASM, but this development method is so brittle that they already need transpiling to support them, that's a red flag. On the other hand, if you're talking about pre-WASM browsers, I don't understand how Rust + WASM is going to help support them.
- e63f67dd-065b 4y agoSorry, I was just responding to your question on JS compilation and webpack. This post is obviously overengineering things, it’s literally submitting a html form and obviously we can do that with plain old html. The point, however, is that it’s a small scale demonstration of how to run rust on the web, not that you should make phishing websites out of rust and wasm. Are there actual use cases for wasm? Yes, particularly for performance critical applications. Games, ML, etc, there’s already a lot of wasm deployed today. Since wasm is here to stay, the natural follow-up question is can we compile to it so I can use <insert favourite language> on the web, and that’s the motivation behind stuff like rust/wasm. NodeJS made it possible to run JS on both front and backend, but nobody actually wants to write JS. So now people are trying to run <favourite nonJS language> on both instead. It’s still in its infancy, so really not recommended for anything other than prototyping and fun exploration, but there’s potential here.
- torstenvl 4y agoThanks! That's really helpful.
- mrits 4y agoIt sounds like you have almost no knowledge of the ecosystem. I wonder why you feel it is appropriate to criticize.
- deleted 4y ago[deleted]
- torstenvl 4y agoI know a lot about web development (for a non-professional). I know very little about modern trends. This approach has served me very well in the past, where I avoided wasting absurd amounts of time and money on things like ActiveX and ColdFusion. Instead of making personal attacks, which are against site guidelines, why don't you actually try articulating the value proposition that several posters are asking about? This is a place for substantive discussion.
- hermanradtke 4y agoWebpack is roughly 10 years old. While you may choose not to use it (like you avoided ActiveX) you should be aware of it if you call yourself a web developer.
- deleted 4y ago[deleted]
- mrits 4y agoIf you learned ActiveX you could have had a 25+ year long career. It probably would have been worth the weekend investment.