2 ms·
And it pulls hundreds of megabytes of shit behind the scenes with god knows what vulnerabilities & backdoors, the resulting browser bundle is hundreds of kiloby
by Nextgrid 7y ago
And it pulls hundreds of megabytes of shit behind the scenes with god knows what vulnerabilities & backdoors, the resulting browser bundle is hundreds of kilobytes of crap the browser has to download & parse (instant on a fast machine & internet, less so on a cheap Android device on crappy underground subway Wi-Fi), etc.
This complexity is out of hand. The worst is we now use yet more solutions (for example server-side rendering, which now needs its own Node server and it's yet another thing to deploy in addition to your main backend) just to try and dig ourselves out of the hole we dug in the first place. Imagine if we suddenly decided concrete isn't cool anymore and everyone should use duct tape. Given its obvious shortcomings we now waste time trying to make tape work, going as far as making concrete-reinforced duct tape and calling it the best new thing of the day... instead of just using the "uncool" concrete in the first place.
This guy has a point, for 90% of projects, you don't need React (those who tell you otherwise are trying to justify their career and position because from my experience most React/Vue front-end positions at companies are pointless and just add unneeded complexity).
War story time: a client was building a complex financial product (includes real-time automated trading, etc). The backend was finished but we couldn't test it because despit several months months the React front-end still wasn't ready and days were wasted on basic things like a signup form, displaying the 2FA QR code, user onboarding wizard, etc. Let that sink in for a minute: we could successfully decide when to make transactions worth millions of dollars automatically, but dug a hole so deep on the front-end that we couldn't do basic things that even the first iteration of HTML forms could do just fine 20 years ago. The powers that be didn't want to lose face so they still kept at using that trainwreck of a front-end instead of ripping the whole thing out and rebuilding it using HTML forms in a matter of hours. I didn't stick around to see if they ever finished the project.
- debaserab2 7y agoJust because a new solution is trending doesn't mean you have to figure out how to use it in your tech stack. Evaluate your needs and where it may or may not fit and decide accordingly. > This complexity is out of hand. The worst is we now use yet more solutions (server-side rendering, which now needs its own Node server and it's yet another thing to deploy) just to try and dig ourselves out of the hole we dug in the first place. No, someone had a project that required SSR and for reasons important to their project wanted to build out that functionality in node. You don't have to use it just because it's out there if you find you don't have compelling reasons to apply it to your project. Just because it doesn't fit your project doesn't mean it's useless for everyone else. Your 90% of projects aren't other people's 90% of projects.
- Nextgrid 7y agoSSR was just an example. It's a valid solution, my point is that it's now yet an extra workaround to a problem we created in the first place. Websites were SSR'd by default back in the day, the backend (with PHP or whatever you had on there) generates some HTML that the browser displayed. Then we decided that wasn't cool anymore and went through this whole clusterfuck of SPAs to justify cool kids' careers and now we're going back full-circle to a way more complex solution with more moving parts of doing exactly what we implicitly had 2 decades ago because we realised cool kids' careers had negative impacts in terms of page load performance.
- debaserab2 7y agoBut SSR isn't a core requirement for many applications. Nor is it necessary to build out a purely javascript based stack on the server side to get SSR with a shared React client codebase. > Then we decided that wasn't cool anymore and went through this whole clusterfuck of SPAs to justify cool kids' careers and now we're going back full-circle to a way more complex solution with more moving parts of doing exactly what we implicitly had 2 decades ago because we realised cool kids' careers had negative impacts in terms of page load performance. I really don't think the author of most of the tooling in the ES based javascript ecosystem are "cool kids trying to justify their careers". If you actually think that, take a look at the github profiles of some of the contributors for many of these repos. There's a ton of smart people working on these tools. They're not chasing trends. Sometimes complex problems require complex solutions. Sometimes they don't. It really depends on your project. Bemoaning the amount of options available seems like a waste of time.
- Nextgrid 7y agoI never said the authors of big JS projects weren't smart. In fact, anyone that manages to keep their sanity in that environment is by definition smarter than me. I however stand by my words that most React/Vue/Angular front-end developers in most companies are absolutely unnecessary and are actively detrimental to the project by introducing complexity to justify their position. Most projects do not have any requirements like real-time UIs that would justify a front-end app and will be just fine with a "boring" backend-rendered UI with some HTML, CSS & forms and will automatically avoid a horde of problems like syncing authentication between your backend & frontend, having to manage a separate build pipeline, server for SSR, etc.
- ummonk 7y agoPreact is like 5KB.
- Nextgrid 7y agoYou do realise that 5KB is bigger than most text content you'd ever display on a webpage? You know how many things can go wrong when trying to download 5KB on flaky public Wi-Fi or overloaded cellular connection? And you're telling me it is no big deal to be loading that with no actual benefit to the user?
- welly 7y agoSorry but 5kb is absolutely nothing for today's Internet connections, public WiFi or overloaded cellular connection or something else, especially if it's provided by a cdn. Yes, it is absolutely no big deal to be loading 5kb. Come on, be serious.
- Nextgrid 7y agoThe problem is not the CDN, it's the last mile. You seriously overestimate public Wi-Fi and shit cellular networks; there are times where a simple HTTP request returning dozens of bytes of text will fail. In these moments every byte matters and personally if I'm going to make my user download 5kb of data I will make sure it's content they care about, not a JS framework. Let's take the example of London Underground's Wi-Fi. It's only available at platforms, not while the train is travelling between stations. When the train arrives into the station it will stay there around 10 seconds. 5 seconds of those are wasted by the phone finding the network and authenticating to it, which means you've already got only 5 seconds before the train goes away and the connection drops off. During those 5 seconds you have lots of apps in the background (push, e-mail sync, background app refresh, etc) that are all fighting for around 1Mbps of bandwidth. There's also the issue of failing gracefully. If CSS or image loading fails the browser will still display the bare HTML and the user will still have their content in a consumable format. If JS fails to load in an SPA the page is unusable and often shows just a blank screen. If SPA-initiated requests fail it's up to the developer to handle the exception and offer the user a way to retry instead of just giving up and waiting for a page reload.
- robertoandred 7y agoHate to break it to you, but servers and server-side rendering existed before React. Sounds like you're blaming good tools instead of bad developers.
- adamrt 7y agoHe's saying that there is client side rendering and now there needs to _also_ be server side rendering to compensate for its shortcomings.
- robertoandred 7y agoThere doesn't need to be server-side rendering to use React. There also doesn't need to be client-side rendering to use React. Besides, a combo of PHP backend codebase and a jQuery frontend codebase has many more shortcomings than a single React codebase.
- Nextgrid 7y agoThere is no world where a tool or language for which you need hundreds of megabytes of unknown untrusted dependencies of dubious quality is considered a good tool.
- deleted 7y ago[deleted]
- grumple 7y ago...what? He was bemoaning React making things far more difficult than they need to be. And I think that’s a fair assessment of the situation. There’s a minimum overhead to maintaining a modern js app that is far higher than maintaining say, a Rails frontend. And it’s more costly for every change.
- robertoandred 7y agoRails and React are in no way comparable. They solve entirely different problems.
- whostolemyhat 7y ago> And it pulls hundreds of megabytes of shit behind the scenes with god knows what vulnerabilities & backdoors I assume you roll your own OS then?