Earlier quoted context omitted.
This is what I meant by gatekeeping; there is common misconception that you have to go looking for a library to solve a problem. And it makes it seem like there's a higher barrier to entry than there is. But the reality is that React is plain HTML and Javascript, in a less error-prone and maintainable package. Everything you can do with vanilla JS you can do in React, but with React you benefit from being forced to s…
As a sibling comment notes, and as I noted in a reply to the OP, I agree with you that working with components is a nice approach and very useful. Using React as you describe is perfectly fine. The SPA craze where everything has to be done via React components is where we've jumped the shark IMO.
Second-Guessing the Modern Web
141–150 of 467 posts
Re: Second-Guessing the Modern Web
#142Either you omit some interactive elements on load, or you try really hard to make sure that the JavaScript loads faster than users will click, or you make some elements not require JavaScript to work - like making them normal links or forms. Or some combination of those. I realise I'm in the minority, but I use JS whitelisting, which means that any SPAs I come across in my web searches (a disturbingly large number, a…
I think modern web misery all stems from an industry problem. Everywhere I've worked, I have insisted on building things with basic semantic HTML, hand coded CSS, and vanilla JS where precisely needed. Nobody listens. You can make something that loads 50x-100x faster, works responsively on every device, has energy efficient rendering, and the UI/UX is dead simple to use and familiar to all people. And yet... at least…
KISS - Keep It Simple, Stupid - Never let me down.
Re: Second-Guessing the Modern Web
#143I empathize with the author but client-side technologies like React have a pretty clear advantage that explains why they're popular: for the people that are tasked to make websites (i.e. us, HN readers), they're easier to work with and they save us time. It outweighs all the end-user-facing cons by a lot, because companies need us, and our salaries are expensive. It's true that they are largely more complex than O.G.…
Re: Second-Guessing the Modern Web
#144Earlier quoted context omitted.
I agree with the sentiment of what you're saying, but I don't agree with the premise that there are no use cases for single page apps. You can achieve a decent UX for some applications by using small amounts of vanilla JS, but it's simply not possible to avoid re-rendering the entire page without using XHR requests at some point. That is how the browser is designed, fundamentally. Because it wasn't designed as an app…
>it's simply not possible to avoid re-rendering the entire page without using XHR Wrong on two separate levels. First up, technologies like iframes , frames , and objects/embeds allow that just fine; you can use at least some of them without any JS whatsoever. Secondly, with avoiding re-rendering you end up avoiding a 200ms ... 500ms load+render of simple full page, at the cost of doing 2...5 seconds of gradual load+…
Thats complete BS, Iframes are just loading other HTML pages so you still need another tech to allow for static HTML to re-render itself. If your just talking about some kind iframe jacking then I don't see how thats remotely relevant.
Objects/Embeds? Sure you don't need javascript to make a page interactive if you have things like Flash/Silverlight/UnityWeb where your just executing through a completely foreign API usually via a plugin.
> Secondly, with avoiding re-rendering you end up avoiding a 200ms ... 500ms load+render of simple full page, at the cost of doing 2...5 seconds of gradual load+render of various bits and pieces. Bits and pieces that often are so unwieldy they cause widgets & content to load gradually, jump around, and sometimes even get hidden behind a loader. While the CPU fan keeps whining at full revs.
Maybe if your using something older than sandy bridge trying to use facebook I guess but outside of these kind of silly edge cases, ive rarely seen an iphone/macbook/desktop from the last 5 years spend more than half a second on any kind of heavy redrawing logic ever.
> The solution became worse than the problem it purported to solve, and your users pay the price in wasted time + RAM + electricity.
Then they can use another app website without JS that does all these features they want but with Iframes and flash.
Re: Second-Guessing the Modern Web
#145Earlier quoted context omitted.
> they're easier to work with and they save us time. I have never seen evidence of this. Its a lie developers frequently mention because it sounds so thrilling to say. Approximately how much time does it save you in estimated hours? Its like asking for a helicopter to take me to work, because supposedly its faster. I'm simply assuming its faster without looking at any numbers or finances.
I truly do not think it's a lie. Not sure why you think it's a thrill. It's saved me hundreds of hours, if not more. It's certainly faster to use jQuery to change a CSS attribute than it is to setup a React project but what's not considered in that calculation is maintaining the state of that attribute or making changes to the logic in the future. Especially on code you didn't write originally. If all you have to do…
How did you come up with that? You tracked the time it took to complete the project with and without React and diffed it?
Re: Second-Guessing the Modern Web
#146Earlier quoted context omitted.
You are contradicting yourself by opening with a claim of time savings and ease of use followed by admitting that the solution is largely more complex. More complex work does not save time in aggregate and is not easier to use.
The solution is not more complex to the developer or user, it's more complex to the browser , which hardly ever complains when you make it work harder :-)
Re: Second-Guessing the Modern Web
#147I empathize with the author but client-side technologies like React have a pretty clear advantage that explains why they're popular: for the people that are tasked to make websites (i.e. us, HN readers), they're easier to work with and they save us time. It outweighs all the end-user-facing cons by a lot, because companies need us, and our salaries are expensive. It's true that they are largely more complex than O.G.…
For the most part I think the reason so many web devs put up with the “all-react” (and similar) development experience is basically cargo culting. If you admit you don’t like it, chances are there’s at least one front-end hipster around who will mock you as outdated, and that’s enough to silence most. For the hipsters, the problems of SPAs are hard, and engineers like hacking on hard problems. Also the fact that the…
Sure, you just do some javascript and HTML to get your thing working quickly, but that hasn't even been recommended since the days of Jquery (where it was recommended over just doing vanilla JS in order to maintain cross-browser compatibility).
It depends on your setup and use cases whether or not something is overkill, but for any reasonably large app just doing some HTML and javascript is not going to be enough to keep things maintainable, and that's before even considering things like browser compatibility, accessibility concerns, localization/internationalization, etc. A simple app or product does not mean the internals are necessarily simple.
Re: Second-Guessing the Modern Web
#148Earlier quoted context omitted.
I think modern web misery all stems from an industry problem. Everywhere I've worked, I have insisted on building things with basic semantic HTML, hand coded CSS, and vanilla JS where precisely needed. Nobody listens. You can make something that loads 50x-100x faster, works responsively on every device, has energy efficient rendering, and the UI/UX is dead simple to use and familiar to all people. And yet... at least…
> loads 50x-100x faster And takes less time to develop in the first place! These frameworks just seem like pure overhead to me.
Re: Second-Guessing the Modern Web
#149I’m tempted to step back and evaluate this on another level. Our industry is very big, and any industry that gets that big will be able to house a lot of people just for the sake of it. If you think we have a large amount of fresh frontend people, understand they are hired almost with a one to one correspondence with fresh product/business people. Modern product development is essentially a polishing job on every com…
Re: Second-Guessing the Modern Web
#150Earlier quoted context omitted.
This is what I meant by gatekeeping; there is common misconception that you have to go looking for a library to solve a problem. And it makes it seem like there's a higher barrier to entry than there is. But the reality is that React is plain HTML and Javascript, in a less error-prone and maintainable package. Everything you can do with vanilla JS you can do in React, but with React you benefit from being forced to s…
As a sibling comment notes, and as I noted in a reply to the OP, I agree with you that working with components is a nice approach and very useful. Using React as you describe is perfectly fine. The SPA craze where everything has to be done via React components is where we've jumped the shark IMO.