There was a previous discussion on how do you know when someone is addicted to over-engineering, and looking at this giant UML diagram, I think this might be the case. The amount of complexity I'm willing to accept is proportional to the the difficulty of the problem. In this case it's manipulating web pages, which shouldn't be too hard. This isn't a knock on React in particular, but it seems all the major vendors ar…
I am sorry but this sounds like Dunning-Kruger effect on your part. You have created library that you think the problem, but which seems to have limited adoption in the wild. What experience in the field you have? Have you wondered how much you don't know about problems and scenarios that view layer has to handle? I've been in same situation once with my OS project. I've did something small that I've been certain doe…
Show HN: Under the hood ReactJS
61–70 of 124 posts
Re: Show HN: Under the hood ReactJS
#62Earlier quoted context omitted.
A paragraph of well thought out text will be ignored. A critical remark on the web framework du jour will be carefully deconstructed, rebutted, and shamed. Funny how that works.
Well for one thing, I really think you're taking this a bit too personally. I don't think anyone here is intending to 'shame.'
Re: Show HN: Under the hood ReactJS
#63Earlier quoted context omitted.
These are all phrases I've heard that don't translate to tangible results. Yeah… but they do translate to tangible results. Using something like React helps to make front-end code simple, scalable, fast, and testable. The car analogy is even worse. A modern vehicle is better than a 60s Beetle by almost every conceivable metric – performance, emissions, safety. In both of these cases, it is preposterous to assume that…
These are marketing buzzwords that can be said about every single web framework, effectively thought-terminating cliches. Every fanboy says their preferred framework is the simplest, fastest, most scalable and most testable. In the car analogy the improved performance of modern cars have more to do with mechanical engineering than software. And the analogy falls apart when you consider that modern web frameworks are…
That's a way argument though; just because these are metrics on which frameworks are compared does not mean that there is no comparison possible. In fact, I'd say quite the opposite!
And the analogy falls apart when you consider that modern web frameworks are invariably slower or roughly equal in performance to its vanilla JS counterpart, but never faster
What are you measuring? I'll bet that React will be a whole bunch faster than whatever DOM reconciliation library you build up from scraps of vanilla JS, in the process creating your own half-implemented framework (because I'm pretty confident that nobody builds an entire application using copy-and-pasted Javascript.)
In the car analogy the improved performance of modern cars have more to do with mechanical engineering than software
So what? It's irrelevant. Mechanical engineering of a modern car is also much more complex.
Re: Show HN: Under the hood ReactJS
#64Earlier quoted context omitted.
I am sorry but this sounds like Dunning-Kruger effect on your part. You have created library that you think the problem, but which seems to have limited adoption in the wild. What experience in the field you have? Have you wondered how much you don't know about problems and scenarios that view layer has to handle? I've been in same situation once with my OS project. I've did something small that I've been certain doe…
But React is bloated. Check it out in comparison to something like Mithril which does everything it does and more in a much smaller and faster package.
I've did Mithril for 6 months year an half ago, before that Ember.js for two years and Angular.js for year even before that. I've eventually settled with React.js because it was just view library, with everything else up to you.
Re: Show HN: Under the hood ReactJS
#65Earlier quoted context omitted.
>that I've heard countless times from fanboys If you're unaware, "fanboys" is a grenade to incite juvenile flamewars instead of collegial discussion. >What's missing is that you can make complex web apps without any of these things, To attempt better instructive discussion instead of arguing from vague and generic platitudes about "needless complexity", can you explain how your simulacra.js (~12kb) is better than rea…
A paragraph of well thought out text will be ignored. A critical remark on the web framework du jour will be carefully deconstructed, rebutted, and shamed. Funny how that works.
Re: Show HN: Under the hood ReactJS
#66Earlier quoted context omitted.
But React is bloated. Check it out in comparison to something like Mithril which does everything it does and more in a much smaller and faster package.
Last time I've checked Mithril it had no event normalization, JSX, scroll control and input state preservation. Does it have those now? I've did Mithril for 6 months year an half ago, before that Ember.js for two years and Angular.js for year even before that. I've eventually settled with React.js because it was just view library, with everything else up to you.
https://mithril.js.org/jsx.html
I've never needed any of the others, not sure.
Re: Show HN: Under the hood ReactJS
#67There are simpler ways to get reasonably fast re-usable components on your project that introduce less accidental complexity.
Carefully consider which thing you actually need:
- A view library that uses components as the main building block (this usually means you already have other concerns like data modeling and routing taken care of)
- A full SPA framework (which people often get from the react ecosystem, i.e. React + Reflux/Redux/etc + React-Router)
Based on which one you need, there are other simpler (in the case of view libraries), and more coherent (in the case of full framework) choices.
Re: Show HN: Under the hood ReactJS
#68Earlier quoted context omitted.
These are marketing buzzwords that can be said about every single web framework, effectively thought-terminating cliches. Every fanboy says their preferred framework is the simplest, fastest, most scalable and most testable. In the car analogy the improved performance of modern cars have more to do with mechanical engineering than software. And the analogy falls apart when you consider that modern web frameworks are…
Every fanboy says their preferred framework is the simplest, fastest, most scalable and most testable. That's a way argument though; just because these are metrics on which frameworks are compared does not mean that there is no comparison possible. In fact, I'd say quite the opposite! And the analogy falls apart when you consider that modern web frameworks are invariably slower or roughly equal in performance to its…
You don't have to bet, you can verify the results yourself. Look here at these benchmarks [0] and compare, Simulacra.js is 22-42% faster than React v15 (depending on whether you also use Redux or MobX). My "scraps of vanilla JS" performs faster! Vanilla without frameworks/libraries is and always will be king of the performance game, though.
[0] http://www.stefankrause.net/js-frameworks-benchmark6/webdriv...
Re: Show HN: Under the hood ReactJS
#69At this point I'm sure I and others sound like a broken record, but if you're new and just jumping into frontend component-based frameworks, please don't start with React. There are simpler ways to get reasonably fast re-usable components on your project that introduce less accidental complexity. Carefully consider which thing you actually need: - A view library that uses components as the main building block (this u…
Re: Show HN: Under the hood ReactJS
#70Earlier quoted context omitted.
I agree that React introduces way too much complexity. From a quick look at your approach, I have one concern: ... You seem to use classnames as variable names. What if some other template has a "name" variable too? What if a stylesheet uses it? I prefer simple placeholders. Instead of: I would use: {{NAME}}
Using class names was just an example, people may get the wrong impression that has anything to do with the variable name. It could have been made more explicit, but I wanted to be as terse as possible: It was also a design goal not to introduce a templating syntax, so `{{}}` brackets are out of the question.
There are two downsides to this:
1) You have to define twice where the data is displayed. Once in the template and then again in the mapper.
2) {{NAME}} explicitly tells the reader "The name goes here". In your solution one would have to look it up in the mapper to be sure what goes where.