Currently working as a contractor, mostly on Node.js and Typescript, also React.
Also have a background in academia, I have a PhD in CS and worked as a researcher in AI.
It poses some questions about current techniques. Is bundling good practice on a HTTP/2 enabled site? I suppose the focus would be on the waterfall: if your initial JS payload says it requires certain dependencies, then those are downloaded, and those files have dependencies and are downloaded... But on the other hand, you still want that minimum load for max performance on first load.
Web Assembly is scary, once it gains momentum the industry is going to take a long time to normalize. It'll make the JS ecosystem explosion look simple.
Currently working as a contractor, mostly on Node.js and Typescript, also React.
Also have a background in academia, I have a PhD in CS and worked as a researcher in AI.
My understanding is that with http2 bundling is considered bad practice. The reason for this is that with http2 the limited number of connections is not an issue anymore, therefore there's no reason not to take advantage of browser features like caching.
Also, now there's no need to regenerate bundles just because there's a change in a JavaScript file.
In a perfect HTTP/2 world, bundling becomes an antipattern. That, however, basically depends on properly-implemented server push, where each file that gets pushed also causes its dependencies to get pushed. If you don't have server push, you can get into situations where you have deeply-nested dependencies and, while you're transferring everything over a single TCP connection, you still have to wait for the browser to discover that it needs a resource so that it can download it.
So, it kind of becomes a 'measure and see' kind of thing. I suspect that, for those environments without server-side push (like Amazon Cloudfront), we'll see a pattern emerge of no longer bundling all of your direct dependencies into one file, but bundling all of their dependencies with them.
Just out of curiosity, I'd like to see the extent of the impact on Angular. Maybe they'd need another messy migration to a future version. I'd assume it would be less of an issue for a React app. I wouldn't really know regarding either.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You are absolutely right. It's funny, yesterday I listened to a podcast about this exactly: devchat.tv/js-jabber/http-2-with-s...
It was very informative.
One of the other new things that are gaining momentum is web assembly. Check this video: youtu.be/MiLAE6HMr10
It poses some questions about current techniques. Is bundling good practice on a HTTP/2 enabled site? I suppose the focus would be on the waterfall: if your initial JS payload says it requires certain dependencies, then those are downloaded, and those files have dependencies and are downloaded... But on the other hand, you still want that minimum load for max performance on first load.
Web Assembly is scary, once it gains momentum the industry is going to take a long time to normalize. It'll make the JS ecosystem explosion look simple.
My understanding is that with http2 bundling is considered bad practice. The reason for this is that with http2 the limited number of connections is not an issue anymore, therefore there's no reason not to take advantage of browser features like caching.
Also, now there's no need to regenerate bundles just because there's a change in a JavaScript file.
In a perfect HTTP/2 world, bundling becomes an antipattern. That, however, basically depends on properly-implemented server push, where each file that gets pushed also causes its dependencies to get pushed. If you don't have server push, you can get into situations where you have deeply-nested dependencies and, while you're transferring everything over a single TCP connection, you still have to wait for the browser to discover that it needs a resource so that it can download it.
So, it kind of becomes a 'measure and see' kind of thing. I suspect that, for those environments without server-side push (like Amazon Cloudfront), we'll see a pattern emerge of no longer bundling all of your direct dependencies into one file, but bundling all of their dependencies with them.
Just out of curiosity, I'd like to see the extent of the impact on Angular. Maybe they'd need another messy migration to a future version. I'd assume it would be less of an issue for a React app. I wouldn't really know regarding either.