I recently had a discussion with colleagues about React vs. Angular for enterprise applications. I'd like to bring this discussion to the dev.to community as well.
The core arguments were:
React comes with less built-in tools than Angular. Therefore, React setups need to complement vanilla React by installing open-source dependencies. This makes the on-boarding of new developers to a project built with React more difficult, as any unknown dependencies need to be learned first. Whereas Angular has necessary concepts and tools built-in, which Angular developers already know and therefore have a quicker on-boarding to a new project.
Angular uses Typescript by default and is built with Typescript in mind. React isn't. Certain patterns in React are hard or cumbersome to type correctly. As Typescript is generally preferred over JS in enterprise projects, Angular is the better choice.
🤔💭 What are your thoughts on this? 🤔💭
Latest comments (25)
Absolutely agree :) React is great, but for enterprise-sized applications Angular is the best structured and fail-safe tool.
I wrote a pretty detailed article on this, which I posted on Linked In. It's still largely valid.
linkedin.com/pulse/which-javascrip...
Since this thread is a week old, I'll just add a little tidbit:
In my large company, they're 100% Angular. Mainly because a central body has to approve all tech stacks and it's easier to start a project if you use the blessed one (Springboot, Angular, MySQL).
However, I'm thinking the central unit is going to change their stance on Angular soon. We have many projects on 1.5 still, and projects last year that were allowed to start on 4 aren't particularly allowed to update every year. I don't see ulta huge company continuing to buy into a stack that has frequent major version updates. They hem and haw at projects jumping from 6 to 7 even though the breaking changes were minimal. In the move fast and break things world of JS frameworks, I could totally see my place bailing and going to Tymeleaf or .NET again.
The company I work for is rather strongly invested in Angular. In the last three years, quite a lot of work has been spent building new modules of our system with Angular as technological basis for the UI part. One rather important point back in 2016 was the consequent usage of TypeScript. For the most part the system is, and the backend part for the foreseeable future will continue to be based on Java. Therefore, the cultural gap, if you will, is somewhat easier to bridge than to pure JS options.
React also supports Typescript, and I think the learning curve in Angular is steep compared to React, Vue is increasingly popular as well and it should also be in the conversation IMO
Personally I'd always recommend angular 2+ for enterprise level apps, but a big factor I always mention to a customer when consulting is to have a look at the market of developers. You don't want to pick a technology or framework that isn't as common or popular amongst the pool of developers you have in the area; then the onboarding time could be drastically different than the initial argument for angular.
In my area the 'biggest fish' has decided that react would be the common framework for all new projects, so service providers are scrambling for react talent. I would love to be a fly on the wall to hear how that decision was made... It's like the chicken or the egg... Did they choose it because it was popular or of out popular because they chose it?
I am not so sure it was the right choice but that the outside looking in. Time may tell.
Martin have you developed any enterprise application in angular latest versions? Can you share some enterprise applications developed in angular? Can you share some global big companies which are using it? I think react have all this. And what about dependencies Issues and too frequent releases? Why?
Disclaimer: I can't speak for Vue, I only have experience with React and Angular.
I agree with both core arguments; however, I wouldn't say that makes Angular the better choice. The clear benefit of React is a smaller learning curve for new team members, as even with external dependencies like redux (and it's variants) there's still much fewer additional and often hard to understand topics you're forced to face right away (change detection, rxjs,...) That said, things like Typescript and rxjs out of the box are things I love about Angular.
At the end of the day I think you can write solid enterprise applications with either framework, and I tend to avoid trying to find an answer to the "but who is better" question. I'd rather be happy we get to choose from more than one framework. :-)
In my experience with both Angular and React, you end up writing the same amount of boilerplate when you have the projects fully working the way you need with all needed packages included. Once you use them both enough you realize, they're actually very similar. Biggest difference is JSX (React) vs html template w directives (Angular). The rest is about the same honestly. In Angular you can release your project as a web component library and then use those components you built in Angular, inside of React. Lol. I mean it's all coming to a similar end game, they're just getting there in slightly different ways. I think eventually they'll all adopt web components and be interchangeable.
Now the recent negative Outlook toward TypeScript I don't get. TS is so awesome. I do all of my front end development to with TS. I've done plenty of pure JS and have found TS just matches the way I personally think about software. I'm a more visual front end developer though so perhaps that plays a part.
I don't think enterprise matters. Does the org want everything, including the kitchen sink, built-in? An highly opinionated way of doing, so they don't need to create their own? Does the org need to pick the same framework a different "enterprise" uses because someone in management golfs together? If yes, then Angular it is, and if your real lucky your brand new parent company uses AngularJS... so now you do to.
Angular emphasizes a declarative, HTML, perspective whereas React places emphasis on a JavaScript perspective, but I think in most projects you end up doing a lot of both. In all seriousness I think current NG comparison can boil down to all-in-one vs smaller individual pieces that are closer to web components.