Angular vs React - Part 2
Which one should you pick?
Angular started it all and React is the hottest thing today. But how do they compare and how would you pick the best solution to your needs and circumstances? I will give you my unbiased (yeah, right!) opinion here.
What to consider
When picking the right solution for your project, several aspects must be considered. It is very common to come across articles from several experts that analyze speed, community, and documentation as important aspects to consider before adopting a solution out of the many competing options. This is great advice, but in addition to that, I will suggest the following three aspects that I consider are important to think about as well:
- Framework vs Library
- Surroundings
- Previous experience
In this post, I will describe what I mean by “Surroundings”. Look for the next post where I will explore “Previous experience”. If you didn’t catch part 1 of this series, make sure you check out also: “Framework vs Library”.
Surroundings
Your surroundings should also be a factor when considering a new technology to adopt. But what type of surroundings am I referring to? Here are some examples:
- Is this a new project that you’re working on for a startup or an enterprise?
- Does this place already have software projects or products or is this the first?
- Is there someone else helping or making the final decision?
- What are the values for this company or group of people?
- Is this going to be a quick feature added to a website or is this going to be a full single-page application?
- Will you be working on this project by yourself or with a team?
- If in a team, what do these developers value?
Do you see where I’m going with this? I’m not going to sit here and type that either Angular or React is the best fit for every single project. They are not the golden goose. They both have their strength and weaknesses, just like anything in this world and so we need to analyze them through multiple lenses.
Let’s consider a couple of the situations you might be in:
Large corporation with a strong preference for enterprise solutions
How many times have you been introduced to new projects where you thought you knew a certain language or technology (Java, C##, JavaScript, etc), only to find out the same day that the way the code is organized does not follow best practices or isn’t necessarily what you’re used to? Then weeks into it you realize the code is very fragile, there aren’t any automated tests in the project, and now you’re afraid of even making the slightest change to it? Having the freedom of coming up with the best solution is great, but it comes with a price. The price that most companies have to pay for freedom-loving developers usually increases as the original developers of a project move on. Developers not that familiar with the code base usually make wrong assumptions or make mistakes because they simply fail to understand the entire code base. Is this a price you’re willing to pay? Is this a legacy you’re willing to leave behind you?
React is great at letting you have this freedom. You’re even free to shoot yourself on the foot if you will.
Angular, on the other hand, has adopted enterprise standards that are implemented on your project from its inception. These standards are made easy to maintain by the use of the Angular CLI as the project progresses. Many of these features come out of the box.
For large enterprises that favor enterprise-level solutions, Angular seems to be a better fit than many of its main competitors.
A startup with a strong preference for quick results
Let’s consider now what could be defined as the opposite situation: a startup company. Startups seem to prefer quick results over stability. Startups also seem to prefer more experienced developers, probably because they prefer quick results. They also worry about original developers leaving them at some point early in the process and would want to find a replacement as quickly as possible.
Even though Angular may provide a more stable path to a highly maintainable app codebase, it does not provide a large pool of candidates when compared to React. For this, and potentially other reasons, React may be a better fit for a startup than other competing libraries or frameworks.
Conclusion
Although this should not be taken as an absolute guide to picking a frontend technology, I hope it has shed some light on a few points of view that you have not considered before. When picking the right technology for a project, it is important to have all things considered before making any decision. The surroundings of the project is yet another angle that should be evaluated for this purpose.