5 Important Takeaways From the State of JavaScript Survey 2018

Publikováno: 11.12.2018

The yearly State Of JavaScript survey results came out recently, and if you care about Web Development, you care about the results. In this article, we'll explo...

Celý článek

The yearly State Of JavaScript survey results came out recently, and if you care about Web Development, you care about the results. In this article, we'll explore the top 5 takeaways and recap the results.

https://youtu.be/afteelmxirs

1. JavaScript Had to Evolve

If you take anything away from this article, understand that JavaScript was forced to evolve and needs to continue to do so. Honestly, I think that developers who start(ed) with JavaScript aren't aware of how many amazing features of other languages it was missing for so long, and the results of the survey directly reflect this.

JavaScript is still playing catchup in many ways!

TypeScript

For many people, the flexibility of JavaScript is exciting, but for others, it can be quite intimidating. Let's look at TypeScript, a typed super set of JavaScript. According to the survey results, the usage of TypeScript continues to grow, which shows that developers are eager to have a bit more structure with JavaScript similar to languages like Java or C#.

Developers love the flexibility of JavaScript but sometimes want a little more structure.

ES6

ES6 JavaScript brought tons of new features and syntax. Most people, including myself, loooove classes, arrow functions, etc. and use them on a daily basis.

As cool as they are, though, did you ever stop to think that they might have already existed in other languages? Classes have been the heart and soul of Java and C# from the beginning. Additionally, I used Async/Await in C# when I started with Microsoft back in 2013. I also used LINQ functions in C# which are remarkably similar to Fat Arrow Functions.

I think all of the new features of JavaScript are incredible, and I use them every single day. I'ts just interesting to note that it has been forced to adapt since it's inception, and it's come a very long way!

2. Tools Are Better and It Makes a Difference

Tooling is one of the biggest drivers behind the evolution of JavaScript!

JavaScript Flavors

There are several different "flavors" of JavaScript, two of which we've already talked about, ES6 and TypeScript. ES6 is more a set of features than a "flavor" to me personally, but TypeScript feels apt here. It's usage requires tooling to transpile down to regular JavaScript that the browser can understand.

Additionally, Flow, Reason, Elm, and ClojureScript are flavors of JavaScript (although neither is nearly as popular as TypeScript). Each of them requires additional tooling to compile down JavaScript, similar to TypeScript.

Although there are several different JavaScript flavors, but ES6 and TypeScript are the two most popular by far! You can read more about the various flavorshere.

Command Line Interfaces (CLIs)

Building websites would be much more complicated without Command Line tools!

With almost any JavaScript framework, you get a Command Line Interface. For example, installing JavaScript packages through NPM (something Web Developers do on a daily basis) is done through the command line. Just imagine what it was like to share JavaScript code before NPM!

If you look at each of the 3 major front-end frameworks (Angular, React, and Vue), each comes with commands to generate new projects, start a live-reloading server, build final assets, and more. These sets of commands can save you tons of time and have become the de facto way to get started with each.

3. JavaScript is More Than Just Web

JavaScript can be used to reach almost any platform!

JavaScript, at times, can be overwhelming. There's always a new up and coming framework, and it can be a challenge to stay on top of it all. However, one of the benefits of this is that JavaScript can be used to reach almost any platform there is.

Desktop Apps

Electron.js allows developers to create cross-platform desktop applications with HTML, CSS, and JS. There are many extremely successful desktop applications built with Electron!

Visual Studio Code is built with Electron and has quickly become the most popular and performant editor in Web Development. I use it on a daily basis, and it absolutely flies! Visual Studio Code makes an appearance in the survey as well!

Here are a few other major applications built with Electron for reference.

  • Skype
  • Slack
  • Figma
  • Hyper

Mobile Apps

In the past, web technologies were used to create mobile apps by wrapping a web application in a "web view" component. In general, this approach has been significantly less performant than building native applications.

Cordova follows this approach, and is still a viable option. However, React Native has gained lots of traction over the past couple of years. It allows you to create truly native applications meaning you don't have to sacrifice performance. As popular as React is (look above), React Native becoming more widely used just makes sense!

Progressive Web Apps

Progressive Web Apps have gotten a ton of attention this past year. They are sort of a hybrid between web apps and mobile apps by allowing the user to "install" the page locally to their device.

Progressive Web Apps were mentioned under the "Other Libraries" of Mobile and Desktop, but keep an eye out, they seem to only be growing more popular. Don't be surprised if they make an even bigger splash next year!

Server

Not only can you target Web, Mobile, and Desktop with JavaScript, you can also write server code using Node.js. Lots of big companies like Netflix, Paypal, Uber, and LinkedIn leverage Node, and more and more beginner developers are learning it before PHP, Ruby, etc.

Major companies like Netflix, Paypal, Uber, and Linkedin are using server-side JavaScript with Node.js!

As with any other category of JavaScript, there are several frameworks that sit on top of Node. Express.js is by far the most popular, but there are several other viable options as well.

Check out "10 Node Frameworks to use in 2019" for additional reading.

4. Servers Are Slightly Less Needed

The term "Serverless" makes an appearance in the "Other Libraries" section of "Back-End Frameworks". Serverless Functions are hosted by third parties that take care of server software and management, meaning less server-side code written by developers.

Static Site Generators

The growth of Static Site Generators contribute to this as well. Because of the de-coupling of front-end and back-end, developers often reach for Serverless Functions instead of writing a server from scratch. If you'd like to learn more about static sites, check out 5 Reasons Static Sites Rock.

Firebase

Firebase offers complete backend services for your app!

Firebase, a comprehensive mobile development platform by Google, provides another alternative to writing your own backend. It takes care of hosting, authentication, cloud storage, etc. providing functionality for anything you might need to support your web application.

JavaScript on the server is certainly not going away, but some popular alternatives don't require server-side code!

5. Testing is becoming more and more important

"Testing, testing… Is this thing on? Sorry, I Jest, but I would never want to make a Mocha-ry of this section. That would be Jasmine (“just mean”? get it?), and that's bad Karma."

First off, that quote is just plain cool! Second, as the popularity of JavaScript grows, testing becomes more and more important. NPM packages can be used by milliions of people so ensuring that they are well tested matters!

There are several options for testing JavaScript with Jest, Mocha, and Jasmine leading the way. Configurations are often built in to application tooling now to leverage these libraries. Angular CLI projects, for example, comes preconfigured to use Jasmine for unit testing and Karma as a test runner.

I've also noticed that more front-end courses put a larger focus on testing. Wes Bos's Advanced React course actually spends 6 hours writing tests which is a ton! Kent C Dodds event went as far as creating his own testing library for React which has gained much popularity. It is aptly named, React Testing Library.

Error Tracking Tools

You might also be interested in tools that help tracking errors after the fact. These tools would help catch detailed errors so that more tests could be written in the future to catch them earlier next time. Here are a couple you should look at.

Recap

Here's a couple of final thoughts.

  • 3 major front end frameworks (Angular, React, and Vue)
  • React is the highest growing and highest paying front end framework
  • Express is still the dominant Node framework by far
  • TypeScript is becoming more and more popular (and it's going to take over...just my thought)
  • Tooling is making JavaScript a more evolved and appealing language
  • Options to reach almost any platform (desktop, mobile, server, web, hybrid, etc.)
  • Graphql is on the rise, especially with the rise of Gatsby.js
Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace