A rather innocent and naive question on Quora sparked a fiery debate, as usual when programmers start debating about what language, framework, library, etc… is better.
I don’t want to continue that debate on what JS framework is better, AngularJS or React.js. I don’t like those fanboy fights in general. I like both those frameworks, and I fully understand why they are different. There’s a side discussion which originated within comments to that question which I would like to recap here.
It’s my fault to have started that side discussion writing…
React looks nice, it’s performance when rendering HTML is it’s strongest achievement, but there’s one fundamental design choice in React that I can’t swallow. To change the DOM you need to use React beautiful designed Classes. That’s because React manage a virtual version of the DOM, which keeps in synch with the browser DOM, to be able to modify it very fast and improve overall performance.
I like Angular (and mustache, and handlebars, etc…) approach much more, angular embrace HTML as it’s template language, and it’s bracket notation just make it incredibly easy to, and quick to, develop applications thanks to native two-way-data-binding.
Now, it’s also true, however you generate HTML, these days you can theoretically manipulate it with css to make it look totally different, in color, shape, size and position.
It looks smart, and fast, and if I was starting to develop from scratch a backend application, I would seriously consider it over AngularJS. But for a frontend app, where in six months it maybe required to overhaul the whole UI? I don’t think I would dare to.
This video comparing React and AngularJS is rather interesting, even if also scratching just the surface analyzing one (different) aspect.