2016-06-14

Developers all know that the JavaScript world can seem pretty crazy with its constantly changing trends and ensuing chaos (e.g. the left-pad incident), but it’s probably safe to assume that things are improving for the most part.

Trending technology become popular since they’re supposed to fix the problems of old (usually related to scaling and complexity issues).

With trends comes demand, especially with technology startups. You don’t have to know these skills, as the biggest factor that comes into consideration is your willingness and ability to learn as well as improve (especially if you’re a junior developer).

So what are the trends in JavaScript development in 2016 (and going forward 2017)?

You might also like…

Top 5 Reasons to Use JavaScript

5 JavaScript Frameworks You Should Learn In 2016

10 Most Common JavaScript Mistakes

15 Must-Read JavaScript Books

5 JavaScript Experts to Follow

React & Redux

2015 has been the year where React gained traction, especially as more and more people started to complain about problems with the massively popular AngularJS framework at the end of 2014. News that Angular 2 will be incompatible with Angular 1 didn’t help enthuse the Angular community, either.

While Angular1 remains the most-starred project on GitHub, interest in AngularJS slowed, with React quickly closing the gap in 2016:

Perhaps a more telling indicator would be the npm download count for react, angular, andangular2 packages:

Granted, the numbers don’t represent the actual number of users of those frameworks, and one has to take into consideration that Angular1 isn’t getting any nice updates since it will be replaced by Angular2. Not to mention, React is not a framework and can be used alongside AngularJS, so the two aren’t truly comparable.

Nonetheless, for the past year or so, React has been clearly getting more love from the JavaScript community than AngularJS.

Looking at the graphs, you might wonder: What in the world happened after August? The npm download count for React seemed to suddenly increase exponentially, and that was also when GitHub stars for React started to catch up with AngularJS’s stars.

Well, Redux happened. Announced by its creator, Dan Abramov, during ReactEurope2015 at July, Redux’s simple flux implementation seemed to have convinced many developers it was time to adopt React.

Before Redux, React had gone through its own ups and downs while people tried to figure out how to best implement the “Flux” architecture. Various implementations popped out, and while they weren’t bad, the lack of a clear, good solution kept many JavaScript developers at bay. Thus, despite all the praise for React for its virtual DOM and universal rendering, people were cautious about adopting it for their projects.

Yet, as more and more people started to use Redux and realize how it makes testing and debugging JavaScript apps easier, Redux rose from the Flux arena as the the winner:

As such, in terms of JavaScript front-end “framework” trends in 2016, React & Redux takes the cake as the hottest stack. Established companies such as Netflix, Dropbox, and Yahoo! have also adopted React in their tech stack, which certainly gives React a vote of confidence.

Nonetheless, Facebook’s Relay will likely be a strong contender to Redux in 2017.

Other Frameworks of Interest

What about other frameworks? While not truly comparable, here’s a general overview for other JavaScript frameworks that get hyped about.

Angular2

Google and Microsoft partnered up for developing the Angular 2 framework, or more specifically Angular 2 will be built with TypeScript, which was developed by Microsoft to make JavaScript a more manageable language. What does this mean? Large (mostly non-tech) enterprises may be interested in looking into Angular 2, especially ones that use Microsoft’s .NET framework. Microsoft has also been pushing .NET pretty hard since last year as it open-sourced many things and strove to make its tools more accessible to developers.

With the rewrite into Angular2, the team hopes to fix all the scaling issues with Angular 1 apps, and performance has been impressive so far. Moreover, other than also being capable of sever-rendering, Angular 2 will support web components, which Google believes to be the future of web development.

However, despite all the effort the Angular team has been putting in to help developers transition from Angular 1 to Angular 2, the AngularJS community is pretty split in opinions about the direction Angular is taking. The rewrite has also caused AngularJS’s community growth to stagnate and allowed React to mature, with its community and ecosystem growing larger each day.

These things have cast a shadow of doubt over whether Angular 2 will be as successful as Angular 1. Of course, given the JavaScript community’s fickleness, there’s still a chance that Angular 2 will rise from the ashes as the “future” of JavaScript and web development, but 2016 is unlikely to turn into the year of Angular2, especially since it’s still in beta. Nonetheless, for those who dislike how convoluted a React app can get in terms of configuration, Angular2 might be a preferred alternative.

Meteor

Meteor continues to grow steadily in downloads and GitHub stars, and it integrates well with React and Angular. As a relatively lightweight, full-stack JavaScript framework with a lot of nifty features, many JavaScript developers find the framework fun to work with. Meteor is generally thought of as a great framework for prototyping and also very beginner-friendly.

However, using Meteor in production seems to be another story. People have learned from Angular1 (or even Rails to a point) that too much magic involves a lot of hidden complexity over time, and this has prevented Meteor from becoming mainstream. What’s more, despite having raised a lot of money, Meteor isn’t backed by a leading tech enterprise with a large pool of engineers like React and AngularJS are, so there’s also that to consider. Granted, AngularJS also has a plethora of issues even though it’s backed by Google, but using Meteor has an even greater investment risk as it’s a framework for both front and backend development. Hosting will also need to be married to Meteor in order to get the most out of the deployment ease they tout.

Not to mention, many developers aren’t exactly a fan of MongoDB (which has the reputation of being the “Snapchat of Databases”), and Mongo is Meteor’s default database. While Meteor is working on supporting SQL, it’s still not supported yet.

Needless to say, Meteor will likely remain niche going forward in 2016 or even 2017. Most professional developers will wait for any evidence that it can be used for developing large, complex applications.

ES6 At Last

It’s year 2016, and if you’re a JavaScript developer who’s not making your apps ES2015-compliant yet, what the heck are you doing?

But wait–what’s the deal with Babel vs TypeScript for writing ES6-compliant apps? Babel mostly transpiles ES6 code to ES5, while TypeScript is a superset of JavaScript that adds optional static typing to JavaScript and compiles to plain JavaScript as well.

While the two were created with different purposes and thus not entirely comparable, Babel supports Flow out of box, which also adds static type-checking to JavaScript and is developed by Facebook. Hence, it likely makes little sense to use both at the same time.

Babel was the first that strode to help bridge the gap between ES5 and ES6 apps, while TypeScript’s support for ES6 played catch-up to Babel in terms of “progressiveness”. From GitHub stars it seems that Babel is the preferred transpiler, not to mention most React developers seem to use the Babel + Webpack combo.

You Might Also Want to Read: Setting Up a React Environment Using Npm, Babel, and Webpack

However, at the end of the day, TypeScript seems to be more and more of a viable, even preferred, choice if you’re looking for a solution to make JavaScript codebase more manageable. JavaScript has a bad reputation for being difficult to read, and even more difficult to debug, not only because it’s a dynamic language but also because it has a very weak type-checking system. Support wise, TypeScript has been around longer than Flow and has a larger community.

In addition, just look at the Google Trends Graph of the growth of interest for TypeScript:

Perhaps TypeScript partially owes its growing popularity to Angular2, but as JavaScript apps get larger, that’s probably not just the reason it’s getting attention. Thus, while Redux makes testing JavaScript apps easier, TypeScript helps make codebase more maintainable (it’s also compatible with React’s JSX). In addition, Microsoft, Google, and Facebook are working together on adding static typing to JavaScript and eventually introducing it to ECMAScript. Google dropped AtScript for AngularJS in favor of Microsoft’s TypeScript, and Facebook’s Flow doesn’t have the same community size as TypeScript.

Thus, it’s safe to say, not only is statically typed JavaScript a positive trend that JavaScript-haters likely approve of, TypeScript is the most future-friendly solution.

Functional Programming is Becoming Mainstream

Or rather, a lot of functional programming concepts have been worming their way into mainstream programming, but recently the “functional programming paradigm” itself has gained tons of renewed attention with the rise of complex web apps.

Languages such as Scala were slowly convincing backend developers to embrace functional programming, but Facebook’s React encouraged front-end JavaScript developers to take a functional approach to UI development as well. With more and more praises for functional programming popping up, it seems as though it finally has the chance to become mainstream.

Now, front-end web development appears to be all about reactive programming and functional programming. Generally, React+Redux is the most beginner-friendly solution for those comfortable with object-oriented programming, since it’s multiparadigm. In other words, React only requires developers to take a functional approach to UI while Redux encourages a functional approach to handling data. Everything else is still done OOP-style.

However, for those who want to jump into full-on functional reactive programming (a.k.a “true” FRP), but still want to stick to JavaScript, then RxJS is a skill to learn. RxJS is a reactive extension of JavaScript that can be used to replace the Flux architecture altogether, and while it may be overkill for small and simple apps, it is a powerful foundation for web applications that need to do a lot of complicated stream processing. Netflix uses RxJS, and Angular2 relies on RxJS for dependencies and promotes the use of RxJS. Since RxJS is developed by Microsoft as well, it works well with TypeScript, and one can expect Microsoft to continue improving RxJS.

Nonetheless, RxJS is said to have a pretty steep learning curve, so some developers simply just give up doing FRP in JavaScript altogether and pick up functional programming languages that can compile to JavaScript.

The most notable contenders are ClojureScript and Elm, but in general the growth of functional reactive programming pales in comparison with React+Redux. (However, Redux was inspired by Elm, so perhaps more developers will want to check out Elm):

Considering how large JavaScript’s ecosystem is, it’s hard to predict the likelihood of a mass migration to Elm (Scala ended up not replacing Java as people kept saying it would, no matter how superior people thought the language was compared to Java). RxJS, on the other hand, currently still has a rather high entry barrier at the moment to become mainstream.

Nonetheless, with the way how functional programming fits so well with addressing modern web development needs, one must say that the functional programming paradigm & concepts will be here to stay as a skill JavaScript developers will need to acquire.

Desktop Framework Showdown: Nw.js vs Electron

Nowadays a lot of software need to synchronize data over different platforms (namely, mobile and desktop). Many services start out as web apps before they ported to support desktop apps for better user-experience, especially since web app development is faster and easier to update. Not to mention, users can instantly try out web apps without having to install anything, so that eliminates a step in the funnel.

In the past, people were stuck with CEF if they wanted to use web technologies to develop the front-end UI of desktop apps. This wasn’t that easy, and the apps also weren’t truly cross-platform compatible. Node.js desktop frameworks have made building cross-platform apps easy, and the shift to using web technologies for desktop app development has been on the rise since 2014. No news there.

Yet there are two main players in the field: Nw.js (previously node-webkit) and Electron. While both are great choices and have their own advantages, this article is about trends.

Thus, let’s take a look at the GitHub Star history for both projects:

Although Nw.js came out earlier and is considered more mature, it appears that Electron is growing at an exponential rate, while nw.js is growing at a fairly linear rate.

But wait! Is looking at GitHub stars fair, considering GitHub is the one that developed Electron in the first place? Well, if you look at the interest on Google trends, it more or less reflects the same thing:

Electron is pretty new, but it’s used by established companies such as Slack, Microsoft (Visiual Studio Code), WordPress, and Sencha. (On a side note, Codementor also uses Electron to power the desktop app for our mentors). Thanks to Electron’s ease of use, the ecosystem and community grew very fast. This popularity is likely going to carry on into 2017, making Electron the framework of choice for desktop app development.

Mobile App Framework Showdown: React Native vs Ionic

Ever since React Native came out, people have been predicting 2016 would be the year of React Native and that it’s the future of mobile development with web technologies, considering how it can be used to build cross-platform apps natively. If you google about React Native app performance, you’d mostly find praises, especially when it’s compared to HTML5 hybrid apps since it runs a lot smoother. So, is 2016 the year of React Native? In terms of hype and interest, it sure seems to be meeting the expectations:

But what about the actual adoption rate? As of writing this article, React Native has not yet released a version 1 (still at version 0.26), so jumping in right now will require the courage and patience to deal with app-breaking changes that requires refactoring the entire codebase, along with a plethora of unexpected issues (Codementor also uses React Native to build our mobile app). Thus, let’s take a look at the approximate npm downloads of React Native vs Ionic:

Well, looking at the graph, it seems that React Native is on its way to overtake ionic as the framework of choice for cross-platform mobile development using web technologies.

In terms of the job market, React Native is also becoming more in-demand than Ionic:

Doing a quick search on AngelList job postings, the results more or less reflect the same thing, where there are 75 job postings for developers skilled with ionic while there were 65 job postings for react native developers as of May 30th.

Thus, familiarity with React Native will definitely be a nice bonus to your resume going forward in 2016.

The Future of Web API: GraphQL vs REST

After Facebook announced they were open-sourcing GraphQL, it has become a hype train many JavaScript developers jumped onto in 2016, especially since Facebook has pretty much become the Apple of JavaScript in terms of open source projects:

GraphQL was aiming to sort of replace REST APIs, but considering how ubiquitous REST APIs are, this is an unlikely scenario:

At best, GraphQL would complement REST APIs doing the things it does better than REST APIs, but it won’t be replacing REST as some thought it was set out to do. Furthermore, GraphQL is still very new and tied in with Facebook Relay, so there aren’t any best practices or enough learning resources for people to pick the skill up en masse. Therefore, 2016 is likely too early for GraphQL to become a thing despite the strong interest and hype. 2017 may be different, but in 2016 it’s not going to be an urgent skill to acquire, with only 6 job postings for it on Angel List as of May 30th.

JavaScript Trends Conclusion

The JavaScript community generally moves at a fast pace, and keeping with the mainstream usually means more resources and support and relevance. Based on the trends examined in the article, today’s JavaScript developer should learn React & Redux, be familiar with functional programming, and get started with TypeScript. In addition, there will be windows of opportunities for those who’ve dabbled with React Native, while having some experience with Electron may be nice. (Of course, it goes without say that TDD is a skill to learn no matter what the year).

The post Top Skills Every JavaScript Developer Should Know appeared first on Free Web Design Tutorials.

Show more