Choosing the JavaScript Framework for next project

Introduction

Last year facebook decided to change react and other libraries license to MIT, but there were some uncertainty about their license this motivated us to write an article to choose a Javascript framework for 2018.

All this uncertainty gives us an alert to think more carefully when you need to choose a framework for your next project. In this blogpost we will discuss current trending frameworks and not so trending ones but very used like Angular.

JavaScript Frameworks for 2018!

A new year started and new javascript frameworks are starting to gain popularity.

In particular VueJS and PreactJS are starting to catch js developers attention.

We will try to help people to choose the proper framework, in particular if you are to start a new project we hope to save you some time and headaches.

The following frameworks will be seen:

VueJS

VueJS is very friendly framework and is a good for junior javascript developers. It's also more popular than Preact and it has more contributors (and the community is great!).

This framework has a very good integration with laravel, which could be a plus if you are planning to use it.

If you want to move away from React, VueJS is definite shift away from it! VueJS has a simple flux implementation via vuex. Community is growing fast.

Another good point is that VueJS documentation is great and the framework comes with with state management.

From React, it got component-based approach, props, one-way data flow for components hierarch. From Angular, it got similar templates with good syntax, and two-way binding when you need it.

The bad things of VueJS:

  • Not descriptive runtime errors in templates,
  • No stable community components.
  • Chinese comments in code across most of community libraries.

Preact

If you already worked with react, the transition could be easier to preact.

Some react libraries are compatible and you can use preact-compat, which gives %100 (or close) compatibility with react. One problem with this framework is that it's too like React and could not make sense to use it (just go for react and avoid pain?).

Preact is a smaller version of react and also it has better performance than react.

It has a lot of features that react has and also additioanl like linked state.

The big concern about choosing preact versus react is that react is baced by facebook while preact could be a dead project in the future. Sometimes preact idea sounds bad, but since it's very compatible with react in the worst case you will need to migrate a small part of your code.

Angular 4

With Angular you will need to learn several concepts like dependency injection, directives, understand scopes, two-way data flows, etc. The good thing about angular 4 is that there are very good practices, like John Papa Angular Style Guide.

The latest Angular version is 4 and from AngularJS 1 to 2 there big changes. Also using angular 4 for a small application seems overwhelming, it requires a lot of files in your repository.

But again using Angular could help with team communication, since there are good practices to follow which will help on the success of your project.