News for hackers. Stuff that matters.
Re:A modern “Hello, World” program requires more than just code by sk0g on Thursday March 05, 2020 @11:46PM (#22501058)
Not literally all of them, but users still have to download a lot more for each website, however basic, when it's built in a heavy framework with lots and lots of little (client facing) utilities.

Gets a lot better when you're visiting lots of such pages, then you have a million versions of each library in your cache.

Re:A modern “Hello, World” program requires more than just code by Kaze404 on Thursday March 05, 2020 @11:49PM (#22501067)
I just created a project with create-react-app and served it with npm's "serve" package. My client downloaded a whopping 10KBs, half of which are React's logo which is a PNG file. It's really not as big of an issue as you think.

Edit: For full transparency, this is the breakdown:

index.html = 1.37KB

main.hash.chunk.css + 2.hash.chunk.js + main.hash.chunk.js = 887B

logo.hash.svg = 3.2KB

logo192.png = 5.47KB

Re:A modern “Hello, World” program requires more than just code by sk0g on Friday March 06, 2020 @12:00AM (#22501109)
That's pretty neat! I'd imagine it's that small because of minification too, but my experience with the React front end codebase at my work has left me rather scarred. So. Much. Bloat.

My biggest issue is with people pulling in dumb libraries on npm that seem to live on someone's self hosted server though, so some branches will CD just fine, while others don't, and then I have to troubleshoot why something completely out of my control isn't working. Ugh

Re:A modern “Hello, World” program requires more than just code by Kaze404 on Friday March 06, 2020 @12:07AM (#22501132)
I can empathize with that. In my experience front end does tend to pull in a significant amount of dependencies, and while I think we can do better I also think it's understandable to a certain extent. Web applications with the complexity we have now are relatively new and we're still trying to figure out how to do it properly. Sure, we had massive applications built with ASPX and jQuery before, but now the web does a lot more than display text and buttons to submit forms.