Google: Angular and Wiz Are Merging
31–40 of 179 posts
Re: Google: Angular and Wiz Are Merging
#32Can anyone recommend a good resource discussing the interplay between highly optimized js bundles and code caching? i.e. it seems to be me that one would benefit by serving the same js blob on most / all pages even if it includes unused code because then you pretty much always utilize the code cache.
Maybe I’m misunderstanding your question but why would you want a single bundle vs multiple bundles? If you have a single blob you have to invalidate the whole thing when it updates. If you split your code out into multiple bundles you can invalidate only the bundles which contain changes. As far as I know this has been standard practice for the last decade at least.
The advantage of bundling is that you can do cross-module minification and dead-strip unused code.
The extreme version of “multiple bundles” would be to minify each JS module individually, but don’t bundle them. That would clearly miss a lot of size optimisations. (And as I understand it, this is how Deno’s new package manager is meant to work, which makes me a bit suspicious.)
The opposite extreme of one bundle for the entire app is great for optimisation, but as you say, then you have to invalidate the whole thing if anything changes.
One bundle per route is tempting but then common code gets duplicated.
Vite’s default behavior (via Rollup) is to make one bundle per common module. That works pretty well but I’ve found the number of output bundles can explode in surprising ways. In a recent project I manually split the code into chunks and loaded them via dynamic import() and that worked pretty well -- good balance of size optimisation, caching and manual control.
Re: Google: Angular and Wiz Are Merging
#33I hate Angular with a passion. It's easily the most verbose, overly complex front end framework I've ever used which just takes the fun out of building web apps and make it a pure pain. I would rather work on a farm and shovel pig shit all day than work in Angular again. My last job forced Angular on me, I quit after a while (not because of solely that reason) but I told them Angular was a bad choice and they chose t…
I've been working with large Angular projects for years and I really enjoy the development experience. Especially now with the new template syntax, signals, and other recent changes.
Re: Google: Angular and Wiz Are Merging
#34Can anyone recommend a good resource discussing the interplay between highly optimized js bundles and code caching? i.e. it seems to be me that one would benefit by serving the same js blob on most / all pages even if it includes unused code because then you pretty much always utilize the code cache.
Maybe I’m misunderstanding your question but why would you want a single bundle vs multiple bundles? If you have a single blob you have to invalidate the whole thing when it updates. If you split your code out into multiple bundles you can invalidate only the bundles which contain changes. As far as I know this has been standard practice for the last decade at least.
Re: Google: Angular and Wiz Are Merging
#35Can anyone recommend a good resource discussing the interplay between highly optimized js bundles and code caching? i.e. it seems to be me that one would benefit by serving the same js blob on most / all pages even if it includes unused code because then you pretty much always utilize the code cache.
In dev though, one usually doesn't even bundle, and runs the app on a dev server that dynamically compiles and serves individual modules. When I initially load the app off the dev server, my browser makes close to a thousand requests for all those modules, but pipelining and caching make it all quite zippy regardless. Bundling is still faster and uses less bandwidth though, so for production one typically does still build a bundle (or several code-split ones).
There's gory details at https://webpack.js.org/guides/code-splitting/ (for webpack; other bundlers like Rollup work similarly) but frameworks like Next/Nuxt do it automatically as part of the build process.
Re: Google: Angular and Wiz Are Merging
#36Earlier quoted context omitted.
i'm with you, i used to use nitter with the firefox extension, but it seems to be dying, is there any alternative?
There is https://twstalker.com/ but the site is very very dodgy.
Re: Google: Angular and Wiz Are Merging
#37Exciting? Possibly for those involved. I hate to say this, as I'm generally optimistic towards most developments like this, but over the last decade I've become so apathetic towards anything and everything from Google. They've lost so much mindshare and credibility. Their org structure leads to stagnation left, right and centre. I'd rather tolerate the poor status quo in React land than take any sort of bet on Google…
But then again, it may just be because they employed the rockstars (Rob Pike, Ken Thomson, and Robert Griesemer) to work on it.
I suppose it's less about the company, and more about who the company chooses to work on the project.
Re: Google: Angular and Wiz Are Merging
#38I hate Angular with a passion. It's easily the most verbose, overly complex front end framework I've ever used which just takes the fun out of building web apps and make it a pure pain. I would rather work on a farm and shovel pig shit all day than work in Angular again. My last job forced Angular on me, I quit after a while (not because of solely that reason) but I told them Angular was a bad choice and they chose t…
I seldom see this opinion but I'm glad to read it. People complain about JSX on the React side but what on Earth am I reading when I see the templating language that Angular came up with? ngIf, ngBlah. Much worse than JSX, which is subordinate to JavaScript code, not equal. I also have been forced to use Angular at the workplace and it killed any fun making web apps had. People say Angular is great for enterprise bec…
The problem with Angular, especially as the app grows is that you will have many different subscribers that all listen on the same state changes, then fire them again so you will have code that just runs again and again and it's extremely hard to have a mental model on how the system work and what code runs when.
The code also easily gets super slow because you run something, it affect state, then it triggers something else that triggers something else that just happen to affect the first state, whoops now you have a loop. Even if the loop resolves, it's pretty much inevitable to get a loop sometimes if the app is complex enough, at least in my experience working with several other devs.
Re: Google: Angular and Wiz Are Merging
#39I hear most Angular projects being stuck at around version 15 due not being able to migrate away from Angular Material "Legacy".