A close up view of a computer monitor with lines of code.

Top 3 JavaScript Frameworks of 2019

JavaScript frameworks are tools that provide a wide range of generic functionality that can be leveraged by programmers to create advanced and complex web applications. A framework is simply a structure that can be built on. So why is this necessary?

JavaScript is a very powerful programming language. Almost all web applications use JavaScript for at least some core functionality. Many of the most popular websites on the internet wouldn’t even work without JavaScript.

But advancing technologies are pushing vanilla JavaScript to its limit. Large websites like YouTube, Facebook, Twitter, Google are incredibly complex. And as web apps become more complex, they require more lines of code. This can significantly decrease the performance of a page. Not only that, but at a certain point JavaScript becomes difficult to read and maintain.

This is where a framework comes in. A JavaScript framework keeps your code organized and structured. It can also improve the pages performance after load time. There is a slight trade off however. Any application built on top of a JavaScript framework will take some extra time to load. This extra load time varies based on the framework you have selected.

For this reason, you want to make sure that the application you are building is complex enough to warrant this extra load time. Vanilla JavaScript or a library such as jQuery is sufficient for smaller websites and apps.

With that being said, there are 3 frameworks that we would like to highlight. There are dozens of frameworks out there, but these are by far the most popular.

React

React was released by Facebook in 2013 and powers many of their products. It quickly gained popularity and is now one of the most popular frameworks among developers. Today it is used by hugely popular applications including Netflix, PayPal, BBC, Instagram, WhatsApp.

Pros

  1. The Virtual DOM: When changes are made to the DOM, a server must update the DOM trees of the entire document, which can be taxing. The developers behind React found a way to speed up these updates by using a “virtual” copy of the DOM. It updates changes made by the user without affecting the rest of the interface.
  2. Component Structure: React makes use of components, which allows code to be reused at any level. This greatly reduces development time and makes your applications more efficient.
  3. Unidirectional Data Flow: Thanks to downward data binding, changes made to the child element structure don’t end up affecting their parents.
  4. Open Source Library: React has a massive and thriving community, and many contributors that test, add features to the library, build tools, and provide support.

Cons

  1. High Pace of Development: React evolves at a very fast rate. It can be tough to keep up with all the latest updates.
  2. Poor Documentation: Related to the pace of development. Updates come out so fast that the documentation simply can’t keep up. There are portions of the official documentation that are out of date. This can make it challenging to troubleshoot problems.
  3. JSX: React uses JSX, which allows HTML to be combined with JavaScript among other benefits. This one is debatable, but some consider JSX to be overly complex and difficult to learn.

Vue

Vue was developed by an ex-employee of google in 2014. Although it doesn’t have the backing of a large company like React, it has grown in popularity over the past few years among developers.

Pros

  1. Small File Size: Of the three frameworks we are talking about today, Vue is the smallest and can range from 18-21KB.
  2. Easy to Learn: Vue can be added to your file with a just a script tag, and doesn’t require any knowledge of npm, webpack, or babel. It is also structured in a simple way that makes it easy to track errors and understand.
  3. Detailed Documentation: The documentation for Vue is very comprehensive and detailed. This makes Vue easy to learn even with basic JavaScript and HTML experience.
  4. Improved Virtual DOM: Just like React, Vue uses a virtual DOM. But unlike React, the virtual DOM tracks which components are affected by changes. React has this capability as well, but it requires additional development time as it isn’t a default feature.

Cons

  1. Less of a Job Market: Angular and React are very marketable skills to have for employment. Vue is still growing and will likely be more attractive to employers in the coming years, but it isn’t there yet.
  2. Maintained by a Small Team: Vue is owned by an individual, and maintained by a small team, while other frameworks (like React and Angular) are owned by large companies and are able to provide more support.

Angular

Angular was one of the first JavaScript frameworks and continues to go strong to this day. It was released as AngularJS in 2010 by Google as a way to build dynamic, single-page applications. In 2016 Google released Angular 2 which was so different from its predecessor that applications had to be completely rewritten. Google continues to release regular updates.

Pros

  1. Large Community: Because of its age and status, Angular has a huge amount of support both by Google and the community.
  2. MVC framework: Angular is a Model-View-Controller framework, which means that as data in the model changes, so does the view. This reduces development time.
  3. Dependency injection: Dependencies define how different pieces of code interact. In many frameworks, dependencies are defined in the components themselves. Angular allows you to define dependencies separately, which makes components more flexible and easier to manage.
  4. Typescript: Angular uses typescript, which is a superset for JavaScript. It makes coding cleaner and (once learned) faster. The adoption of typescript is ideal for the complex applications that justify using a framework.

Cons

  1. Steep Learning Curve: Because Angular is so complex, it is challenging to learn. There are many ways to perform any task, which can cause confusion when learning the framework. It also has many versions which can add to the confusion.
  2. Performance: Angular is bulkier than other frameworks (although still relatively small) and isn’t quite as fast as React, Vue, and other newer frameworks.
A laptop displaying code.

Which Framework Should I Focus On?

This is a more challenging question to answer than might be expected. Each framework presents different benefits, challenges and setbacks. Angular is the oldest of these frameworks, and has good backing. The downside is that Angular can be challenging to learn. It has widespread acceptance in the industry. Learning Angular might be more challenge than it is worth. As React and Vue gain popularity, Angular is starting to be viewed as an aging framework, particularly because of performance drawbacks.

React is becoming incredibly popular, and the future of this framework looks bright. More companies are moving to React, and it has recently caught up to Angular in the job market. It is relatively easy to learn, and is excellent for new developers, startups, and larger companies. React is likely the safest framework to learn, and currently the most worthwhile.

Vue is arguably the best framework from a purely development standpoint. It is highly flexible and simple to learn. That being said, it doesn’t have the same backing or popularity as Angular or React. It is a risky choice as a framework to learn. It is very possible that in the coming years, Vue will become the most widely accepted framework, and there are a number of signs that point towards this being the case. It has recently gained support from a number of Chinese tech giants, and Vue plans on moving towards typescript. But it is also possible that Vue doesn’t break into the wider industry in the same way that React and Angular have.

All three frameworks are popular and beneficial in their own ways. Frameworks are shaping up to be the future of JavaScript for complex applications, and it is worth learning any of these. Each has some transferable skills, and in that regard, there is no wrong choice. We recommend React or Vue over Angular, but understanding any framework is better than understanding none.