Re:Is the web getting slower?
by sanitycheck on Wednesday September 09, 2020 @05:46AM
(#24419213)
So.. There are benefits to this for complex apps - but 90% (charitably) of this kind of code is not in a complex app.
I think it's for two main reasons:
1. If you don't use complicated new technology you won't get a job doing web dev.
2. Many new JS devs don't understand JS/HTML/CSS well, they only understand a particular framework - and even then not in a sufficiently deep way.
When you come across a seemingly normal site that requires JS in order to display anything, it's pretty unlikely that anyone involved ever considered not doing it that way.
Re:Is the web getting slower?
by lukeramsden on Wednesday September 09, 2020 @04:06AM
(#24418572)
> Often this happens because we want only a small bit of the functionality too.
To be fair, this 'compiling' also allows for tree shaking, which if you use a well-structured library like lodash/date-fns etc, allows you to get that small bit of functionality without paying for the whole library.
Often this is to do with making a site work across browsers. IE11 is the bane of our lives! Plus doing the transpiling allows using things like Typescript which is a godsend on a complex site.
Re:Is the web getting slower?
by WrtCdEvrydy on Wednesday September 09, 2020 @12:04AM
(#24416992)
Wait till someone wants to add JS polyfills for everything...
Re:Is the web getting slower?
by RandoHolmes on Tuesday September 08, 2020 @08:45PM
(#24415407)
100% with you there.
I personally think it's a bit insane to add node.js as a dependency to a simple PHP project.
Re:Is the web getting slower?
by WrtCdEvrydy on Wednesday September 09, 2020 @12:02AM
(#24416982)
To be honest, we've seen this in Rails and PHP in the form of grunt.
I started working with some web developers for a simple project recently, my mock product was built with vue.js using the standard way of “including” it: But what really threw me for a loop was that the web developers told me that that’s wrong, they are now _compiling_ (Or, semantically “packing”) JavaScript blobs to make even very simple websites.
I don’t know why we as a community have started doing that, but it feels like an anti-pattern, it makes adding new dependencies opaque and we can very quickly end up including dozens and dozens of lines of code which must all be rendered by every device that comes into contact with my site.
Often this happens because we want only a small bit of the functionality too.