News for hackers. Stuff that matters.
Re:Why I don't use web components by 5trokerac3 on Thursday June 20, 2019 @10:19AM (#20233171)
Everything is a give and take. At large organizations I've been at, web component frameworks - especially strictly typed ones like Angular - have tremendously helped to standardize web development across a large team of varying skill levels. When there's only one standard way to make a GET request and a defined interface that the result has to meet, output is much more stable.

On the other hand, these frameworks can be completely unnecessary overhead for one or two person teams. I'm currently using Preact for personal work, just because of how simple and lightweight it is.

To the author's point on site's that work in older browsers or without JS, unless you're building a product for government use or for an org that has really archaic IT requirements, the chances of needing polyfills that aren't provided by default in the framework are really low. The chances of someone needing your site to work without JS is also really low, especially if you're providing any sort of complex functionality.

Re:Why I don't use web components by jerf on Thursday June 20, 2019 @10:59AM (#20233559)
I think you're reading "web component" as a generic term, but the author is using it to specifically refer to Web Components as a specific browser technology: https://developer.mozilla.org/en-US/docs/Web/Web_Components

You can sort of imagine it as another generic "web component" framework, but blessed into full, native browser support, and getting some features/technologies that required browsers to implement new features to support them.

Re:Why I don't use web components by tyingq on Thursday June 20, 2019 @10:29AM (#20233248)
"site's that work in older browsers or without JS"

I'm curious about this. A graph of say, what percentage of the top 500 websites can't run without JS, over time, would be interesting.

My assumption is that it's a non-trivial percentage, and growing.

Re:Why I don't use web components by jbarberu on Thursday June 20, 2019 @10:50AM (#20233468)
As a past user of NoScript and current user of uMatrix, I can tell you a lot of sites do not degrade gracefully without javascript...
Re:Why I don't use web components by HelloNurse on Thursday June 20, 2019 @12:31PM (#20234502)
"The top 500 websites" aren't relevant. Their needs and tradeoffs are different, and of course they tend to be negative examples.

Does your site work without JS? If not, what justifies the more complex development and the degraded user experience for you and your audience?

Re:Why I don't use web components by tyingq on Thursday June 20, 2019 @01:19PM (#20235029)
This has nothing to do with my site. I'm curious what the trend is amongst the most visited sites. You sure read a lot between the lines that isn't there.
Re:Why I don't use web components by 5trokerac3 on Thursday June 20, 2019 @10:43AM (#20233378)
I think you're right, but that number should be correlated with number of users running browsers with JS turned off, which I suspect is trivial and shrinking.

The biggest issue I've seen with virtual-DOM sites is SEO. Google's crawler started using JS a number of years ago, but there are others that don't.

Re:Why I don't use web components by murphysbooks on Thursday June 20, 2019 @10:48AM (#20233444)
> older browsers or without JS

For sites that just convey text, they should work without JS. This would mostly solve accessibility (a11y) issues if sites looked to use simplicity wherever possible instead of adding complexity to solve issues caused by complexity.