What Javascript Framework Should I Use?

18 May 2017

What Javascript Framework Should I Use?

Current Trends in Front End JavaScript Frameworks

Recently, I've been looking at web programming trends to try to see which way the industry is going. Over the past 2 or 3 years, there has been a shift away from the more traditional server-client web applications built using php, .net, ruby, java and such - where the server does all of the processing and spits out the resulting dumb html to the client. As server demands have increased, the scaling method of just upgrading the server to have faster processors or more memory becomes a limiting factor (vertical scaling). Instead, the more recent trend has been to make front end, in-browser code more intelligent and do more of the work, and the server more streamlined so that it does mainly optmised web services, spitting out raw JSON code in response to client requests.

The most popular front end frameworks are angularjs, ember.js, and backbone which have been developed to create Single Page Applications (SPA's). SPAs handle all the complex UI and business logic and only call back to the server when they need to update from central databases, eg hotel search results or auction listings. 

Another trend is to make servers which are more flexible and agile. So data is consumed via RESTful web services, often using JSON instead of XML as this can more easily be used with noSQL databases like MongoDB, Cassandra or Redux. (the advantage of noSQL databases is that they allow for flexible data structures and can handle massive data sets using horizontal scaling or 'sharding' as its often referred to). Server technology like NodeJS or .net Core is very lightweight and only uses those modules which are required for the service so is very fast and can handle many thousands of requests per second.

 

Most Popular Javascript Framework

So if you want to future proof your web development skills, you'd better learn about front end JavaScript frameworks. But which framework is best? Well, if you google that question, you will get many different opinions about the speed of development, the speed of the application, the amount of code needed, the number of supporting modules that are available and many other factors. I spent some time this week reviewing this information and concluded that there is no definitive single reason to use any of the main frameworks, each has their own strengths and are appropriate for different circumstances. So instead, I decided to look at which are the most popular ones. The reasoning behind this is that if a framework is popular, it is likely to be more supported, more used and more likely to become the emerging technology of the future. 

The graph below, taken from Google Trends, shows that the most popular search is for AngularJS. It looks like Angular 2 has been gaining ground at the expense of angular 1 - Angular 2 is a completely rewritten framework and changes a lot from version 1. A newer framework, vue.js was developed by one of the founders of angular because he was not happy with the way that the project was heading. Vue.js shares a lot of similarity with angular 1 and is probably worth watching for the future, however the main winner in this battle looks to be angular 2. If trends continue in the same direction, angular 2 will be the most popular search phrase by the end of next year.

 

 

Google trends report on JavaScript frameworks over past 5 years

View current trends here

 

So Should I Learn Angular 2 then?

Just because a framework is popular, doesn't mean it will be the one that emerges as the winner. If you look at the current job market for front end developers, there are a lot of adverts for front end developers using ember, react, backbone and other frameworks but most are still concentrating on PHP, Java and C# and if you want to get a job as a web developer, you will still need to know at least one of these. Asynchronous SPA applications are growing in popularity, especially so if you plan on making mobile apps (its quite easy to create mobile apps using Phonegap if you have built a site as an SPA), and with the decline in desktop and increase in high traffic mobile apps, I would recommend at least reading a bit about how the modern wave of JavaScript frameworks can change the way you build web sites and online applications.