Angular vs. React vs. Vue - A Quick Look
#Let's start with Angular
Angular as we currently know it started out its life as something completely different. The structure, the cohesion, and the way things communicate with each other looked more like React in design with its own distinctive Angular-esque
Two-way binding used to be available until developers learned the hard way that multi-directional data communication is hard to manage over time. As the application and its data grew, so did the complexity and potential nodes of support that needs to be monitored. In the current form of Angular, they've adopted unidirectional data binding, which means that data can only be inherited from a parent-to-child direction and not the other.
In addition to this, a module's separation of concern is split between three different files - the module, the HTML, and the CSS. This means that data, its logical processes, and views are physically separated.
#What about React?
React has exploded in popularity over the years. In part, it is a lot easier to pick up than Angular. When it comes to React, the setup is minimal and each component is contained to the smallest visual and functionality set possible.
Then it just becomes one big jigsaw task of composing your views and linking up everything via
props injections. While you can do this in Angular, the way React is structured makes it much easier for beginners and veterans of code to perform.
From an implementation point of view, React is easy to pick up, integrate into current projects, and highly modular - if it is correctly written.
Unlike Angular, where structure is required and pre-baked into the framework, React's freedoms do come with a series of costs. New developers (especially those who are also new to code in general) are more likely to create tightly coupled architectures. Data management and code modularization can easily be abused.
Despite this, the ecosystem of React developers is also growing at a faster rate due to the number of starter free courses pushed by major code learning spaces such as Free Code Camp, Code Academy, and HarvardX. As a result, more developers are talking about React, resulting in more resources due to the strong and constantly growing community. With over 2 million GitHub repositories that are related to React in some form, React is bigger than Angular (840k) and Vue (644k).
#Where does Vue fit in with the Angular vs. React debate?
Vue is an interesting one. In a way, it can be seen as a fork of Angular.js, pruned and trimmed to only contain the good and favorite bits. It came out three years after Angular.js' debut and three years before Angular's architectural framework rewrite.
It is much more lightweight than Angular but a little beefier than React when it comes to size. In part, this is because React is a library with a focus on UI rendering rather than data management. Similar to React and its relationship with Redux, Vue also has a flux-inspired centralized state management system called Vuex. The most challenging aspect of frontend development is maintaining the growing data needs by applications and their functionalities.
#Which framework/library should you use?
React is popular because it's easy to pick up and robust to use. However, Angular and Vue should not be disregarded as they both have their technical merits.
To decide which framework or library you should use for your project, there are a few things that need to be considered:
- size of community for ongoing support and learning resources
- React has the biggest community, followed by Angular, and then Vue.
- speed of delivery required
- Angular has the biggest learning curve because it is a full framework that comes with a kitchen sink full of pre-written modules, extensions, and add-ons. React is minimal in terms of bundled APIs but has a strong open-source community. Vue is highly supported, despite it being the smallest in the comparison.
- current team knowledge, strengths, and weaknesses
- This is possible the deal breaker. If your team are Angular developers, then it might make sense to stick to Angular. If your team is an ad-hoc eclectic collection of skills, React or Vue may be the better option due to the smaller learning curve. Angular requires time investment to learn. React and Vue requires structural discipline, which can work well for seasoned developers who have strengths in other programming languages such as Java and C++.