paint-brush
Angular vs React — the DEAL BREAKERby@dominik.t
192,304 reads
192,304 reads

Angular vs React — the DEAL BREAKER

by Dominik TarnowskiJanuary 15th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Angular is a full framework with all the tooling and best practices designed on top of it. Suits ones, hates the others. React on the other hand is just a small view library that you would need while making an app. This might be both good, and a bad thing, and the article should help you to finally make the right choice.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Angular vs React — the DEAL BREAKER
Dominik Tarnowski HackerNoon profile picture

A REAL, EXTREME framework comparison

Angular is a full framework with all the tooling and best practices designed on top of it. Suits ones, hates the others. React on the other hand is just a small view library that you would need while making an app. This might be both good, and a bad thing, and the article should help you to finally make the right choice.

libraries

And here are the main libraries I will keep in mind:

  • Angular
  • React
  • Vue

Learning curve

Let’s assume you know JavaScript + ES2015 quite well. What library is the easiest to learn next?

  1. Vue is probably the best choice if you want an easy to learn framework.
  2. React uses the least abstractions, however it will take more time to learn the best practices, as there are a lot of ways in which you can do the same thing or go wrong.
  3. Angular goes 3rd and although after you learn angular you should know everything else associated to it (typescript, MVC…), angular itself is a huge library that requires more time to learn.

Scalability

  1. Angular is easy to scale thanks to its design as well as a powerful CLI.
  2. React claims to be more testable and therefore scalable than vue and I think that is partly true.
  3. Vue being just behind react, it is a good choice however it lacks a list of best scaling practices, resulting in a lot of spaghetti code.

3rd party library compatibility

  1. React. Although it doesn’t work with DOM, it is pure JavaScript logic and its popularity even the DOM based libraries have their alternative in React.
  2. Vue works perfectly for both DOM and JavaScript and is only second because it has less framework specific libraries that could actually be a good thing for others.
  3. Angular would have done better, if not Typescript that requires type definitions for every library.

Tooling

  1. React, angular and vue. All have great CLIs and work with any webpack-like tool.

Community and Popularity

1.Definitely React has been the most popular when it comes to English frontend and full stack communities in 2016. It is also becoming a good choice for native JavaScript mobile and even desktop apps.

2.Vue and Angular. Vue because it is growing so quickly, and angular because it is made by google and its predecessor, angular 1 used to be very successful back in the days.

Jobs

  1. React and angular, as depending on where you are one of these frameworks will slightly dominate.
  2. Vue is less popular and is not supported by a big company, therefore businesses choose angular and react.

Performance

No ranking for this one, as all of them are comparable. React might be a bit faster when it fully support fiber, but now we are still in beta and nothing really can be done about it.

Company’s Perspective

  1. Angular has free open source licence. It is supported by Google, making it probably the best choice for a company, as there is also less things that differ between angular practices.
  2. React used to come with a patent clause that for some businesses was quite a big issue, but recently they switched to MIT.
  3. Vue isn’t a child of a big company, it’s a very successful side project started by one person and therefore companies tend to ignore it more often, however they shouldn’t in my opinion.

Beyond the Web

This is where there is a lot to talk about; native rendering. All libraries are capable of doing so, but some of them perform better than others.

  1. react — with react native, react sketchapp and next.js, it is the best choice when it
  2. vue is the best choice for vue developers that enjoy native mobile development, all thanks to alibaba weex.
  3. angular comes with ionic 2 and nativescript, but neither of those mobile frameworks allow angular to reach the performance of react native.

Simplicity + Code Length

  1. vue comes with prebuilt data binding and MVC model, making it way easier to set up compared to react and angular.
  2. react is fairly simple to understand but in fact it takes a long time to set up a react project.
  3. angular is not simple at all. Its complexity often causes a lot of confusion and angular specific 3rd party libraries and syntax

Development time

  1. Vue is certainly easy to set up and does not require many changes or syntax and that’s what people love about it; it was designed to solve the fatigue.
  2. React takes longer to set up, but then you can start to make an app and it should be relatively easy to add new features.
  3. Angular although being very competitive, the amount of unnecessary syntax it requires to do simple things puts angular in the last place.

Size

  1. vue is the smallest and contains a lot as well. Actually you might think it doesn’t matter, but say that to a cheap android 3g smartphone and I don’t think you will be so sure about it.
  2. react is bigger than vue, but still smaller than angular. That’s all I’ve got to say.
  3. angular is way bigger, causing longer load times and performance issues on mobiles.

The future / 2017

Here are my predictions for 2017 for all these frameworks:

  • Vue will keep gaining popularity and more developers will switch to it. It is possible that it will influence a different big company to promote vue and encourage companies to use it. There is also another thing, native platform that should be out there in the early 2017.
  • React team will introduce fiber, and make react way quicker than vue and angular.
  • Angular team will try to encourage more people to use angular, and in my opinion they will fail miserably.

So what is the best for you?

To sum up, there is never a perfect solution and there never will be. However, here is a useful list to help you make the decision:

  • if you are a passionate developer, try all, but chose between vue and react and let your gut make the decision
  • if you are a start up, go with either react or vue.
  • Angular would be a better choice for companies with big teams
  • Google -> angular
  • if you like simplicity, get vue.
  • if you like to use templates, go for vue or angular.
  • if you prefer JavaScript and JSX, try out everything.
  • if you 💙 Typescript, use angular or maybe, maybe vue.

To summarise, choose your framework as soon as you can and don’t, please don’t stay undecided. I had that for a few moths, not fun. I decided to sacrifice the popularity and go for what my mind tells me is the best, currently vue.

funfunfunction (YouTuber) said the best thing I have ever heard about the JS framework fatigue:

“There is a point in your programming career, when you realise that there isn’t a best tool”

And with that said, I would like to encourage you to keep learning and exploring; everything will teach you something, and there is no right or wrong choice here, just go for it.