7 ms·
Sorry, but the very first comment in every single React vs Angular article is always: “React is not full MVC, it is just the View, wheras Angular is MVC so you
by projectramo 10y ago
Sorry, but the very first comment in every single React vs Angular article is always: “React is not full MVC, it is just the View, wheras Angular is MVC so you should not even compare the two.”
And then they compare the two.
- rubber_duck 10y agoReact isn't full MVC but there is a whole ecosystem out there tailored around it and it winds up being full MVC in practice - but you have to do the legwork of figuring out what to add in and how to glue it together. I've said this before - my personal view on this is that if you would descirbe your self as a JS developer you will probably like React more, and if you're coming from a .NET/Java background Angular will be much more familiar. Having used both and having experience with both functional/dynamic programming with Clojure and enterprise/OOP/static programming with WPF/Silverlight - I prefer Angular - I think the tooling and approach it leverages fall in to a category that's prooven to scale with "enterprise grade" developers. I like the simplicity and purity of React architecture - using React wrappers in ClojureScript like Reagent is very "satisfying" - the entire language/platform just "fits together" from immutable state management being the core of the language to sexpression DSL being a natural thing for lisp. I very much dislike their implementation and tooling like JSX and flow which has 0 community adoption compared to TS. I feel like their design is heavily influenced by the problems of Facebook - for eg. shoehorning this kind of things on to plain old JS is an ugly mess for the sake of being easy to introduce in to existing code - crucial for a huge project like say FB - completely irrelevant to a new project. And the fact that you have to merge so much different libraries in the hell that is JS ecosystem of build tools, duplicated libraries, constantly obsolete tech, etc. ads a ton of overhead with very low practical value. If I needed to migrate an existing JS project to a new framework gradually I would not even consider Angular 2, but if starting a new project it would be my go-to choice.
- projectramo 10y agoYou are obviously a thoughtful person who knows a lot about the subject than I do. I didn't mean to disparage the articles that make these claims. In most instances they go on to say some of the things that you just did. They do almost all start out by pointing out the V vs MVC distinction though, and I was just trying to point that out in the jokey spirit of the article.
- zxcvcxz 10y ago>I think the tooling and approach it leverages fall in to a category that's prooven to scale with "enterprise grade" developers. I think react is proven to scale too and it's being used by a lot more large companies than Angular 2. Just a few months ago I tried to do the hello world tutorial on the angular 2 web site. I tried to do the javascript version and I couldn't get it to work. I then tried the type script version, still no luck. It wasn't until a while later when I tried again and they had updated the tutorial that I was even able to get hello world to run. I've programmed some large web apps in angular 1 and while I never fully understood the depths of angular 1 I was still able to leverage the parts of Angular I needed to build fully functional apps. Now coming from Angular 1 I feel like I'm in a somewhat new world. Then I tried react. It was simple, it didn't require me to completely re-learn everything I know about web dev. I wish I had tried react sooner. If it's good enough for facebook and the hundreds of other big websites that use it, then it's good enough for me.
- rubber_duck 10y agoI put "enterprise grade" in quotes on purpose. React stack (not React alone) being used successfully by a 9-5 Java or C# shop is not something I'd be willing to bet on. Sure it's simple as far as hello world apps go, but once you start adding state management, routing, etc. you start seeing that it diverges from conventional architecture approaches. Not saying that's necessarily bad but it does not mesh well with enterprise development - I hope you understand what I mean by this. And tools that help ensure consistency/quality in that kind of environment like TypeScript are very unsatisfying with React and various libraries, for eg. look how tedious Immutable.js typed records are, and check out typings for Redux related libs - bunch of any typed parameters and return values. Flux basically has no support outside of React and it wouldn't even run on Windows last time I checked. So like I said - it depends on the context - if we're talking a bunch of JS frontend devs I'd say go for React if it fits what you're trying to do. If you're a .NET/Java shop Angular 2 is probably going to be a better fit, patterns like DI, OOP, etc. are all at the core and it's a full stack framework you just pick up and follow it's conventions/best practices/design decisions - way less decisions than React and way better docs (for the stuff not included in React I mean, React documentation is decent).
- joewood1972 10y agoJSX has zero community adoption? Or was there a missing comma in there? Of the React code I see, I would estimate that JSX adoption is high 90s. I've used both Angular, played with Angular 2 and React. Plus many other MVC (and MVVM) libraries. I would say that the state managed React model is far more scalable than the traditional MVC 'observable' model. Sure, you can use immutability in Angular-2, but with React you have an architecture built around simplicity with the need to integrate different artifacts. JSX helps React to scale because it extends type safety of TS or Flow into the UI DSL. JSX allows the developer to deal with the DOM as an object graph expression, right in the language. From a strongly typed perspective, this works much better than templates or embedding code into HTML.
- skrowl 10y agoYou forgot this tweet or image: https://twitter.com/thomasfuchs/status/708675139253174273 https://twitter.com/thomasfuchs/status/708675139253174273 That seems to be required when mentioning React since you can't learn just React, you have to learn React + at least 5 other things to get the same featureset of Angular 2.
- tracker1 10y agoAnd Angular 2 is 10x the size, so again, you have to learn a lot to be effective in either. The differences to me with React + Redux, is you have far fewer surprises, it's easier to refactor and fewer wtf's per day. I spent a month working on a relatively small ng2 app and only had one single day without a weird "wtf" moment. I've done several apps with ng1, and can't count the wtf's... with React + Redux, far fewer wtfs, and beyond that, far easier to jump into an existing app and find what I need to change. Can never say the same about ng1 and ng2 isn't much better than ng1 in that regard. In the end, I'd rather start with a boilerplate and build with React + Redux over ng1 or ng2. Yes, there is webpack + babel (you need a transpiler for ng2, and should use a build tool regardless), the tooling around react + redux isn't too bad, and significantly smaller still than getting started in even a medium complexity app in ng.
- collyw 10y agoAs a mainly backend developer who dabbles in front end, there seems to be a lot of overlap between these JS framewors and backend frameworks. You are likely going to need a backend framework to serve JSON and do data validation and authentication, so I don't see the need for having so much functionality on the frontend frameworks. The View part seems to be the part I need. It gets really confusing as to where the logic should end up going (and a lot of it seems to make more sense on the back end anyway - why do I need routing in the front end for example?).
- davidjnelson 10y agoSo the back button and reloading / sharing the page work.