6 ms·
For the life of me, I can't understand why React is as popular as it is. A web application is simply HTML, CSS and Javascript. Why do people want to make it so
by rhapsodic 8y ago
For the life of me, I can't understand why React is as popular as it is. A web application is simply HTML, CSS and Javascript. Why do people want to make it so damn complicated?
I was around when browser based apps started to take over the enterprise software world. One of the big selling points was its simplicity compared to native desktop development languages like (horrors!) Visual Basic. Anyone could open up Notepad and create a simple HTML page with some form elements and a submit button.
Now, I realize that browsers' capabilities have advanced enormously in the intervening years, but it's still just HTML, CSS and Javascript, once the transpilers and the zillion other build tools get done with it. And I would argue that someone who really knows HTML, CSS and Javascript at a deep level can write it directly and maintain it a lot more efficiently than with a bunch of third-party frameworks and an overly-complex build process.
- vbezhenar 8y agoWhen people tried to write big enough applications with JavaScript, they found out, that it was a mess. JavaScript is a terrible language, so another languages were born (including modern JavaScript which isn't that bad). DOM is a very low level and very verbose API, so various approaches were taken to simplify development, e.g. jQuery, Angular, React. Hello world apps might be easy to do without frameworks, but once you're making complex pages with dozens of inputs, asynchronous loading, etc, lack of frameworks is likely to turn your code to a mess. Or, if you're brilliant developer, you might invent your own little incomplete buggy framework. It's similar to WinAPI. Sure, you can write C with WinAPI and it's enough for simple applications. But in practice people use better languages and frameworks. Simple JavaScript has its place, of course. If I'm making text-only website and I want to introduce just a little bit of interactivity, like image gallery, using anything but a few lines of JavaScript is overkill.
- rhapsodic 8y ago>When people tried to write big enough applications with JavaScript, they found out, that it was a mess. I have written huge, complex, graphics-intensive applications with Javascript, and that was not my experience at all. So maybe it's not the language, but the person using it that is responsible for the mess. > It's similar to WinAPI. Sure, you can write C with WinAPI and it's enough for simple applications. That is a very far-fetched comparison, in my view.
- ricardobeat 8y agoDo you use any framework, library or specific patterns in your apps?
- rhapsodic 8y ago>Do you use any framework, library or specific patterns in your apps? Yes, but my team takes the same approach that Facebook or Google takes. We don't try to shoehorn in some general framework made for some other application by someone else. We make our own, that serves our own particular needs. We are the architects and the builders of our software.
- abiox 8y ago> So maybe it's not the language, but the person using it oh. it would seem this is more about you feeling impressed with yourself, rather than making substantive arguments.
- rhapsodic 8y ago>oh. it would seem this is more about you feeling impressed with yourself, rather than making substantive arguments. That is my argument. It's simple logic. If I can get good results without React, I've proven that React is not necessary to get good results.
- abiox 8y agothat seems like a trivially true statement, if not an outright tautology.
- DCoder 8y ago> someone who really knows HTML, CSS and Javascript at a deep level can write it directly and maintain it a lot more efficiently My brain cycles are limited. I would rather let my toolchain catch the trivial errors and focus on more important tasks. I love TypeScript and React/JSX for this – typechecking my code, including views with data bindings and event listeners, saves my sanity.
- Kagerjay 8y agoFrontend frameworks solve a need for SPA (Single Page Applications). While simple HTML/CSS/JS can handle simple static sites, something that needs reactive components (e.g. interacting with something on the site, and populating change instantly) is much easier in a framework. Javascript natively is quite difficult to do this and requires a lot of code to handle simple logic. This is what libraries are good for. React and Vue are such frameworks. These frameworks also allow for iOS and android integration as well. However, I do agree with things being overcomplicated. I keep my tool chain process as lean as possible, with as few dependecies needed. I find it baffling that people would use React for something like an ecommerce site. Its all about the right tool for the right project. Not everything benefits from React, but some things do some things do not.
- rhapsodic 8y ago> Javascript natively is quite difficult to do this and requires a lot of code to handle simple logic. Statements like this are what boggle my mind. I just don't see what's so damn difficult about native Javascript.