by stupidcar · 7y ago · 0 comments
To me, Angular is what HTML and the DOM would look like if they had been designed from the beginning for application development:
- Custom elements backed by controller classes. - Data-binding and event-binding syntax baked into HTML - Component style encapsulation, on by default.
React seems far more like a project created by people who dislike front-end development: As I recall the genesis of the project was to replace traditional DOM mutation with a more PHP-esque approach of updating state and re-rendering everything, just as you would do on the back-end.
I used to love angular, then I got a job which was a “| async” dumpster fire and spent a year watching a team of smart c# developers wallow in a mire of disaster so bad it became a two week regression to change a text field on a form. So full of amazing functional statement no one, even the original authors, could touch it without breaking something in the process.
so.
Your milage may vary. I no longer particularly like angular, personally, because I find it a chore to herd inexperienced FactoryInjectorConstructorFactoryPattern angular developers into not screwing things up.
...but talented team can do well with it too, and I’ve seen people screw up react projects too.
It really is more about good practice and experience than framework, your personal preference is probably, like mine, basically irrelevant.
Decorators aren't inheritable or composable. Because templates are strings, you need the hacky DI and superfluous module system to avoid tag name clashes.
As for React, it is nothing like PHP. JSX is a macro for function calls that return objects; as such they are first-class data structures with all of the benefits you would expect. Yes, it is just a view layer and you need to bring more stuff in if you have a big project planned.
If angular floats your boat that's great. The last time I used it was in a team of mostly C#, Java and Python enthusiasts. Once they figured out what was es2015, what was typescript, and what was Angual, the dev experience was generally reviled. (especially once they saw some react code). I generally don't say that I won't work with a technology, but after a year with it (and having years for AngularJS/1.x, React, Ember, Vue and Backbone under my toolbelt) I am content with saying that Angular sits with Backbone at the bottom of the pile of what I would choose to use again.
This is a really poor characterization. I started using React because I love front-end and it was exactly what I wanted front-end development to be. It solved every one of the pain-points I was experiencing with a jQuery/Backbone/Handlebars stack.