Emre Surmeli, Author at General Assembly Blog

JavaScript Will Continue To Be Important

By

JavaScript is the ubiquitous scripting language of the web. Throughout its lifetime, it has had more than a few competitors, like JScript developed by Microsoft in the late Nineties and WebAssembly that has been around since 2019 (designed by W3C), but over time JavaScript has unified the way web sites are built and how browsers run. It has brought life and functionality to pure HTML and CSS static web pages by making them interactive. Currently, over 90% of all websites have some JavaScript running them. More importantly, over the last decade, JavaScript has jumped out of the browser and into other realms of application development such as back-end development, mobile development, and even machine learning. In recent times libraries and frameworks built on top of JavaScript have also been gaining popularity; in some cases, we are seeing JavaScript taking a backseat and running “under the hood.” Along with a worldwide community that maintains and develops JavaScript and its surrounding ecosystem, it seems evident that JavaScript has established its importance and is here to stay.

An Exploration of JavaScript & Its Importance

Why will JavaScript continue to be important? 

To best explore this statement, we will need to look at JavaScript holistically and highlight the programming language’s important aspects:

  1. We need to understand how JavaScript became the language it is to explore its background and history.
  2. We will need to understand where JavaScript stands performance-wise and how it compares to other scripting languages and competitors.
  3. We will look at where JavaScript is currently and the ecosystem that has been built around it.
  4. We will look at (or at least speculate) where the language is going and try to understand why it will continue to be as important.

Let’s dive in! 

Background & History

Developed internally at Netscape in 1994 by Brendan Eich and first released in 1995, JavaScript was not initially as popular as it is today. In fact, it was considered a somewhat messy and hard-to-manage language.

Here is JavaScript: The Definitive Guide v.s JavaScript: The Good Parts compared in size.

But over the years, JavaScript has become the ubiquitous programming language of the World Wide Web. Not to be confused with Java, which was the most popular programming language in the 90s when JavaScript was developed. Initially named LiveScript, and then changed to JavaScript, this caused some confusion and was later believed to be a marketing ploy by Netscape..

JavaScript was the programming language that brought life to previously static web pages by making them interactive. As its name suggests, JavaScript is a scripting language which are programs that can interact with HTML and CSS and make them do certain things – for example, when you click a submit button on a credit card input, JavaScript is there to make sure the servers receive that information and let you know what is going on with your request by changing the way the website looks. Every browser has its own JavaScript engine. There are many different engines:

  • V8: used by Chrome and Brave.
  • SpiderMonkey: used by Mozilla.
  • Chakra: used by Microsoft Edge.

Inherently, all JavaScript engines work similarly to each other with only slight differences. At their core, they compile the JavaScript code run by websites into byte code which our computer’s hardware can then interpret. 

Current Ubiquity: Inside & Outside the Browser 

In the last 10 years, JavaScript has been ubiquitous in web development because browsers use it. But in 2009, it jumped out of the browser and into the back-end with the release of node.js. By taking the Google V8 engine, developer Ryan Dahl introduced to the world JavaScript and its new ability to run servers. With the release of node.js, JavaScript allowed developers who worked purely in the client-facing parts of web development to have skills previously reserved for back-end developers. This would, over the next decade, be a huge pillar in JavaScript’s already established importance.

And not only that, within the past decade, we have seen JavaScript move into other parts of the application development ecosystems as well:

  • Back-End
    • Node.js
    • Express
    • NestJS
  • Mobile
    • ReactNative
    • NativeScript
    • Ionic
  • Machine Learning
    • TensorFlow
    • Brain.js
    • Webdnn
  • Blockchain
    • Truffle.js
    • web3.js

In a short time, JavaScript has become omnipresent in the world of application development. And the most interesting part is that so many frameworks are being built on top of JavaScript that we might not even be writing pure JavaScript one day. We see that companies are giving preference to building their applications with JavaScript frameworks like React and Typescript that allow you to develop apps without writing pure JavaScript.

JavaScript searches on Google over 5 years:

TypeScript searches on Google over 5 years:

Performance

Performance-wise, depending on the benchmark and environment, JavaScript can compete with most programming languages. In addition to that, the answer to JavaScript performance lies in the engines. In addition to precompilation abilities, there are optimizations such as just-in-time compilation that allow the engines to do less work. On top of that, each browser has its own engine developed by different tech companies; this creates an interesting competition environment. Therefore companies are trying to best one another at making their engine better than the other, which translates to better performance over a shorter period of time. 

Here are some benchmarks that ran with some simple computations, and we see that the JavaScript V8 engine is, in fact, able to compute faster than most. 

Future

With a bright future ahead, JavaScript is currently one of the most-used programming languages and a high-demand computer software industry skill. Some of the biggest tech companies are developing and maintaining JavaScript libraries, engines, and frameworks.:

  • Google
    • V8 Engine
    • AngularJS 
    • Chromium
  • Facebook
    • React.js
    • ReactNative
  • Microsoft
    • Chakra Engine
    • Typescript
  • Mozilla
    • SpiderMonkey Engine

JavaScript is baked into these companies’ core products, so we can say with certainty that while they’re around, JavaScript will also be there..