Hacker News new | ask | show | jobs
by zodiakzz 1865 days ago
I am a senior web developer with 12 years of experience, also perplexed by that statement.

Edit: The React repo is 3 million+ lines of code, written in its own niche language...

6 comments

There are different definitions of "simplicity". The entire stack top to bottom may not be simple, but if the developer experience is simple (which it can often be on the web- that's a major driver of the web's prevalence as a platform), that can be what matters.

I have a theory that the people who go on about how the web ecosystem is too complicated are either 1) web developers who are nostalgic for the jQuery days (and have selective memories about those days), or 2) non-GUI developers who enjoy the theoretical virtues of a QT or a GTK but have never actually had to work on a complex GUI, and so can't appreciate the incredible benefits the web has over those other platforms.

Maybe you are too young, but there was a time were we used RADs (Rapid Application Development) environments like Delphi, VisualBasic, Visual C++, etc. Those solutions which are from 1990s, are still years ahead in simplicity vs what you need to do to build a full web solution today (front-end and backend). Of course the web has many other benefits, like 0 install, runs everywhere, always updated, etc., but calling web development simple is just crazy in my humble opinion.
What are the incredible benefits of the web? Have you worked on a complex QT app?
I have worked with both, including Widgets and Quick. I wonder why you think Qtcom is focusing development on Quick, which uses QML (JSON-like syntax) and JavaScript (ES6), while declaring Widgets "feature complete", mostly releasing minor fixes, in other words, keeping it stagnated. The obvious answer for me without getting into Mobile vs Desktop development is: it's easier to get new professionals to use technology as popular as JS (or any other web related stuff), and definitely cheaper for companies to hire said professionals, therefore making it a easier pick for new projects. To summarize the benefits: easier for junior devs to use and because of that overall cheaper/faster deliveries. Note that I'm not saying anything about quality.
Junior developer doesn't mean a developer who just knows JavaScript. Cheaper developers doesn't mean faster or cheaper delivery in the long run. And I don't think brundolf meant cheaper developers.
I have seen a LOT of Qt apps and 100% of them had worse UI than your average web app.
I've seen lots of Qt apps. Most of them have been much better than the average web app.
Where do you get that figure from? I'm looking at the add/delete statistics for instance:

https://github.com/facebook/react/graphs/contributors

It doesn't seem possible for this to add up to 3M lines of code?

Indeed, tokei gives me ~400 000 lines, including ~310 000 LoC.
In my 20 years as a developer I’ve learned that the more polished something looks on the surface, the more complex the codebase under the hood becomes. Things are simple to the end user because of all that complexity.
That is my experience, too. I worked on a SPA with a more or less simple looking table that presented hierarchical data and made them editable with form elements. Under the hood there were hundred lines of very dense rxjs code and the whole thing was communicating with about 10 HTTP endpoints. But it looked simple.
It's a monorepo, so the only package you are really interested in is 'packages/react-dom', which I'm guessing is less than 3 million.
what niche language?
Flow
I find it interesting (and, a bit funny, tbh) how flow became a niche language. This is the difference investing in tooling makes, folks.
while preact is 3kb and does the same
it does not do the same. it does few things that react does and thats it. what an ignorant comment
There's preact/compat sub-module for the remaining react features, please inform yourself before inappropriately flaming someone. There some very slight differences https://preactjs.com/guide/v8/differences-to-react/#what-s-m... nothing blocking at all
Does it have hooks? Class components are super tedious in comparison.
`import { useState } from 'preact/hooks';` yes https://preactjs.com/guide/v10/hooks