Comparing the best frontend JavaScript frameworks of 2020

Tags: javascript, react, frameworks, webdev
Published: 2020-06-23 19:15:01

*This article was written by Debbie Otuagomah
and was originally published at [Educative](https://www.educative.io/blog).* 

JavaScript is the language to learn if you want to build for the web. It can execute right in your browser and allows you to create powerful functionalities for a web app’s frontend or backend. There are tools that allow you to build web applications faster with high-level functionality. These tools are called frameworks. In this article, we will look at:

* [What is a front-end framework?](#what-is)
* [Why use a front-end framework?](#why)
* [The seven most popular JavaScript frameworks](#top-seven)
* [Wrapping up and resources](#wrap-up)

<br>

<a name=”what-is”></a>

## What is a front-end framework?

In [web development](https://www.educative.io/blog/web-developer-faq), developers either work on the front-end or the back-end. The front-end refers to any part of your website or application the user interacts with. When you visit a website, all you see, from the header down to the content, and all the interactions are part of the front-end. This includes the buttons, forms, images, layout, and basically everything you can see and use on the website. On the other hand, the back-end is what happens under the hood. This includes everything that happens on the server-side, databases, and everything the user does not see behind the scenes. 



JavaScript developers use frameworks as a foundation to build applications faster. A framework is a bunch of reusable code created for specific functionality that you can use in your programs. Frameworks help you to avoid unnecessarily reinventing the wheel or wasting time writing code that’s already been made! Many popular front-end frameworks for web dev are written in JavaScript, so you can manipulate them to suit your needs.

**Front-end frameworks** are pre-packaged code you can use to build user interfaces faster. They allow you to organize the design elements of your web applications and come with pre-built components like buttons, forms, navigation bars, and more. Popular examples here include React.js, Vue.js, etc. Conversely, **back-end frameworks** allow you to build robust APIs, work with web services, and databases. You can use them to handle multiple HTTP requests and connect with any database you want to use.

<br>

<a name=“why”></a>

## Why use a front-end framework?

Using a front-end framework has plenty of advantages, and most developers will encourage you to use them. Some of the advantages  are:

* **Reuse code.** Frameworks remove the need to write repetitive code and give you access to reusable pieces of code that you can use to build web applications, mockups, and prototypes.
* **Consistency.** Front-end frameworks provide a consistent user-side design with components you can use all over your application.
* **Support/documentation.** The support for a front-end framework is great because a lot of people use it and you will probably find answers to all your questions from one google search. Also, the documentation is often very thorough.
* **Database management.** Back-end frameworks provide robust database management for your web applications because the application state is managed inside the framework’s data models, instead of the DOM.
* **Easy to use.** It is easy to integrate with other tools when you are using a framework. They also allow developers to use the latest [ES6](https://www.educative.io/blog/javascript-es6-tutorial-a-complete-crash-course) features and worry less about browser compatibility

For instance, in React, we can create a component like so:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/yf9bisdtzxewobwddjmt.png)

Here, we have built a small component we can use throughout our website instead of creating yet another copy of the same piece of code as we would in plain HTML/CSS. How great is that?

<br>
<a name=”top-seven></a>

## The seven most popular JavaScript frameworks 

Now that we know what front-end frameworks are and why we need them, let’s dive into the most popular JavaScript frameworks of 2020 that you should know. Choosing a framework can be a difficult decision, so let’s take a look at what each offers and how they differ.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3z75svq210n9ww0ahwz6.png)

### Vue.js
Vue is a JavaScript framework used to build user interfaces for web applications. It was created by Evan You in 2014 and is best suited for single-page applications, asynchronous components, prototypes, and server-side rendering. If you are already familiar with JavaScript, you can easily pick up Vue.js, as you don’t need to know tons about JSX or [ES2016](https://www.educative.io/blog/javascript-es6-tutorial-a-complete-crash-course) to get started. The latest version of Vue features composition API, the global mounting API change, and fragments. Some notable companies that use Vue.js are Facebook for their Newsfeed marketing, Adobe's Portfolio product, and Grammarly's interface. 

#### Pros
* **Easy to learn.** Vue.js has a simple approach that allows beginner developers to start using it within hours. If you are comfortable with building with HTML, CSS, and JavaScript, you can start learning to use Vue.js.
* **Performance.** It can increase your app’s performance, as it is very fast and lightweight.
With Vue js, you get components and views that you can reuse at any time and integrate into an existing app.
* **Community.** Vue.js’s documentation is very thorough and comprehensive. It also has a large, helpful community you can join.
* **Flexibility.** If you want to write your template in pure HTML or JavaScript, that’s totally fine. Vue.js is flexible and lets you write your template however you want.

<br>

#### Cons:
* **Limited plugins.** Vue.js cannot be used with some common plugins that make web development easier, which can be a huge drawback.
* **Language.** While Vue.js has a supportive community of users, a substantial amount of materials on Vue.js are written in Chinese and this can pose a challenge for English-speaking users.
* **Irregularities.** Although Vue.js is very flexible, this can sometimes bring irregularities and errors into a codebase, especially if a team is working on a huge project.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ahfs4p8fikg21mrywh0f.png)

### Angular
Another popular front-end framework is Angular. Created by Misko Hevery and Adam Abrono in 2009 as a side project, it is currently maintained by Google. Its current version, released May 2019 is called Angular 8 and built entirely with Typescript. The framework features differential loading, lazy loading syntax, and builder and workspace APIs.

With Angular, you can use HTML for your templates and bind the HTML to express your components clearly. It also helps you reduce the amount of code you have to write with its data binding and dependency injection, all in the browser. Some notable companies with Angular in their tech stack are Google, Udemy, and Amazon. 

> Note: There is a difference between Angular.js and Angular. Angular is the new version of Angular.js, and it offers many improvements. AngularJS is open-source, JavaScript-based framework for dynamic app development. HTML is its template language. 


#### Pros:
* **Data binding.** With Angular, data binding is a breeze and you can create your applications/templates faster. All the changes are in real-time and any change you make to the layer is automatically displayed on the model.
* **Server performance.** Using Angular improves the server performance of your application. This is because Angular only serves your static files and responds directly to API calls.
* **Asynchronous programming.** It makes asynchronous programming easier with the RxJS library.
* **Clean code.** Because Angular is written in Typescript, it has cleaner code, scalability, and tooling. It compiles to JavaScript but will point out your errors when you are coding.
* **Reusable components.** Angular provides you with reusable components you can create or use at any point while building your web application.

<br>

#### Cons:
* **Migration.** If you are dealing with legacy code, migrating from the older version(s) (Angular JS) to Angular 8 takes a lot of time, which can slow down your project/team.
* **Learning curve.** The learning curve for Angular is pretty steep, and if you aren’t familiar with the [Model View Controller](https://www.educative.io/blog/mvc-tutorial) architecture pattern, it can be quite tough to work with Angular.
* **Complexity.** Angular is also sometimes complex and unnecessarily verbose. You may require multiple files and dependencies for just one component.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/xpr4dhwwjtk206v85nq7.png)

### React.js
[React](https://www.educative.io/blog/what-is-react-tutorial) is a widely-popular front-end library created by a Facebook software engineer, Jordan Walke in 2011. It is used to create dynamic user interfaces and is well-loved among JavaScript developers. React has a thriving community online, great documentation, and even courses on its website. Sometime after it was released, the React team created React Native, a framework for hybrid mobile development.

React renders web pages in a way that makes them dynamic and responsive to a user’s input. It is an open-source JavaScript library and lets you build impressive user-side interfaces that are fast and SEO-friendly. Some features of React.js include reusable components, one-way data binding, and the virtual DOM. Some notable apps build with React are Facebook (homepage), Instagram (geolocations and tagging), and the New York Times (Oscar red carpet project interface). 

#### Pros:
* **Reuse HTML code.** React lets you use pieces of reusable HTML code anywhere in your app and you can use them with any other components in your build.
* **Easy to learn.** The learning curve for React is not very steep, and you can start building small applications by reading and following the documentation and tutorials.
* **Improved DOM.** With the virtual DOM, React removes all the inefficiencies associated with using the actual DOM and improves the performance of your web application.
* **Easy migration.** Migrating from an older version of React to a newer one is easy, and you can also integrate it with other frameworks like Angular and Backbone.
* **Storage.** When used with Redux, React helps you store and manage your components in huge applications.

<br>

#### Cons:
* **Too speedy.** React is developing at an incredibly fast pace and for new developers, so it may be hard to keep up with.
* **Poor documentation.** It has been said that React has poor documentation because the library is evolving so fast, and there is no time to properly document all the new features.
* **Limited team size.** React is unopinionated, and in a large team with different approaches, this can pose a big challenge and bring inefficiencies into the codebase.


> ## Keep the learning going. 
> Become a frontend developer without scrubbing through videos or documentation. Educative's text-based courses are easy to skim and feature live coding environments, making learning quick and efficient. And with Educative's organized learning track, you'll always know what to learn next. 
> [Become a Front-End Developer
](https://www.educative.io/track/beginning-front-end-developer) 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/cus8wf71zd5cighexo84.png)

### Express.js 
Express is a JavaScript back-end framework that helps you create Restful APIs that accept requests from the frontend and send an appropriate response.  With Express, you can build a sturdy back-end server. Created in 2010, Express.js is a flexible Node.js framework that can help you build a backend for single-page applications and hybrid applications. It is an open-source tool, and some of its features include a flexible middleware pattern, debugging, and robust routing tools. Some notable companies with Express in their tech stack include IMB, FOX Sports, and Kuali. 

#### Pros:
* **Fast development.** Express js gives you a fast development experience and helps you handle requests efficiently. 
* **Community.** This framework has a vast, highly supportive open-source community, which makes finding answers to your questions easy.
* **Integration.** With Express.js, you can integrate numerous third-party tools and template engines like EJS, Vash, and Jade.
* **Static files.** With this framework, you can easily serve the resources and static files of your app.
* **Connect with other databases.** You can also connect Express with databases like MySQL, Redis, and MongoDB.

<br>

#### Cons:

* **Organization issues.** With Express js, the code organization needs to be very clear to avoid problems during code maintenance. 
* **Refactoring.** Refactoring your code becomes tough as your codebase gets bigger. 
* **Time-consuming.** You need to create endpoints, which may be time-consuming. 


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/blut1q2jltng1oc8adng.png)

### Backbone.js
Backbone.js is another frontend framework that allows you to structure the code you write in the Model View Controller pattern. In this framework, the view also doubles as a controller, and it listens to events that happen in the DOM and passes them to the models as needed.

Backbone was created in 2010 and is written in JavaScript, even though some parts of it rely heavily on jQuery. It provides a structure to your web applications and features key-value binding, custom events, and a rich API. With Backbone, you can also connect an API you’re already using with your user interface. Some notable companies with Backbone in their tech stack include Reddit, LinkedIn, and Trello. 

#### Pros:
* **JavaScript.** Backbone.js is written in JavaScript and is entirely open source.
* **Learning curve.** It also has a shorter learning curve and if you are already familiar with JavaScript, you can quickly pick it up.
* **Automatic updates.** When a model changes in Backbone.js, the HTML template automatically gets new updates.
* **Small datasets.** If you are working with a small dataset, this framework works great and also allows you to use JSON.
* **Restful API.** Backbone.js has an easy-to-use Restful API.

<br>

#### Cons:
* **Limited templates.** Backbone has its own dependency on a library known as underscore.js, which is the only way you can create templates.
* **Limited size.** This framework does not work well with large datasets and is only good for single-page applications, not multi-paged ones.
* **Community.** The community for Backbone is very small and this may not make help readily available when you need it.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/giv8xj50dqw5vq3350ev.png)

### Ember.js

Ember is a user-side front-end framework for creating single-page web applications with complex user interactions. It’s mostly used for its scalability and flexibility. Created in 2011, it has a small but active community and gives the ability to write structured, organized code. It’s a Model View Controller framework that developers used to build user-side web applications. It uses a route as a model and handlebar template as views, and the controllers manipulate the data in the model. Some notable companies with Ember in their tech stack include Square, Twitter, and Groupon. 

#### Pros:
* **Built-in data layer.** With Ember, you get a built-in data layer, which allows you to automatically synchronize your user interface with the backend.
* **Documentation.** Ember has thorough and well-written documentation. This also includes a guide that can help you start building as soon as possible. 
* **MVC.** Unlike other frameworks, Ember works with the Model View Controller pattern and uses a two-way data binding.
* **Browser extensions.** It also uses a browser extension called Ember Inspector, which lets you edit your applications in real-time. 
* **Conventional.** Ember.js follows a conventional approach, so it's not complex to figure out if you're already knowledgable with frameworks.
 
<br>

#### Cons:
* **Learning curve.** Ember has a steep learning curve, and this can be a hassle for new developers. 
* **Errors.** Ember is highly opinionated, and this can introduce errors into the codebase as people have different ways of doing things. 
* **jQuery.** Some parts of the framework rely a lot on jQuery, and this may be a challenge for developers who use AJAX requests.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ot9cbat9s3mt32uaehd1.png)

### Meteor.js

Initially created in 2012, Meteor is an isomorphic framework written in Node.js, so it can be used for both the user-side and server-side of your application. It is best suited for rapid prototyping and can be used for both mobile and web applications.

With Meteor, you can build a full-stack application without needing to integrate with another framework. It is easy to pick up and gives you access to a ton of useful libraries with different functionalities you can use to get your app up and running. Libraries like Tracker and Blaze help you build a smooth, consistent user interface in no time. You can also integrate this framework with MongoDB. Meteor features a complete development ecosystem, live reload, and isomorphic JavaScript code. Some notable companies with Meteor in their tech stack include Accenture, Rocket.Chat, and ShopCo.


#### Pros:
* **Easy to learn.** Meteor is easy to learn and the learning curve is very short. You can start prototyping with the framework if you know some JavaScript.
* **Conversions.** With the Cordova platform, you can convert your Meteor web apps into mobile apps with the same code.
* **Community support.** Meteor has a thriving large community and this makes help readily available when you need it. It also has rich documentation and tons of resources to help you get started.
* **Smart package.** Meteor has a smart package option, which helps you save time when you’re building an app.
* **Language.** With Meteor, you can use the same language for both the frontend and backend: JavaScript.

<br>

#### Cons:
* **SQl limitations.** If you want to use SQL with Meteor, you might run into a few issues. MongoDB is a better bet.
* **No testing framework.** Meteor does not have an official testing framework, which can be quite stressful, as it keeps changing within a few months.
* **Inconsistencies.** Meteor is not an opinionated framework, and if you are using it on your team, it can introduce some inconsistencies into the codebase.

<br>

## Other frameworks you should know: honorable mentions 

Even though we have covered the most popular JavaScript frameworks and libraries, there are some that aren’t as popular but still worthy of note.

### Svelte
Svelte is a component-based JavaScript framework for frontend development that’s similar to React and Vue. It was released in 2019 and allows developers to build a consistent user interface with reusable components. Svelte has no client-side dependencies, which makes the framework run fast. The learning curve is not too steep; however, it has limited features and you might have to write your own code or use third-party tools.

<br>

### Aurelia
Aurelia is a framework that is made up of JavaScript modules. It helps you build powerful web and mobile applications. Created in 2015, it has well-structured documentation and follows the convention over configuration approach. Aurelia uses one-way data binding and does not force you to code in a predetermined way. The downside to this framework is that its unopinionated nature can make code inconsistent.

<br>

### Mithril js
Mithril.js is a new front-end framework that lets you create fast single-page applications. It has a lightweight API and allows your application to run fast as it does not render the actual DOM. Instead, it automatically updates the elements you change. It is written completely in JavaScript and is easy to pick up. However, the small API here can be a disadvantage, as it may not work well with bigger projects.

<br>

> ### Are there other frontend frameworks you think we should include? Let us know in the comments! 

<a name=”wrap-up”></a>

## Wrapping up and resources

There are tons of frontend JavaScript frameworks out there, each with its own unique features. I hope this article has helped better understand them. It’s important to integrate powerful tools with your programs to save time, effort, and truly master JavaScript! 

<br>

### Keep reading 

* [What is React? A tutorial on how to get started](https://www.educative.io/blog/what-is-react-tutorial) (article)
* [Build an app from scratch with Vue.js
](https://www.educative.io/blog/build-an-app-from-scratch-with-vue-js) (article) 
* [React Router Tutorial: Adding Navigation to your React App
](https://www.educative.io/blog/react-router-tutorial) (article)
* [React for Front-End Developers](https://www.educative.io/track/advanced-front-end-developer) (course track)