JavaScript turns 26! - Questers

JavaScript turns 26!

As we mark the 26th anniversary of JavaScript, we invited our colleague Vladislav Petrov, a JavaScript Engineer at team News UK Tech, to share his thoughts on how the scripting language has evolved over the years and what makes it so popular nowadays. Read what he shared:

Vladislav Petrov - News UKIn the late 1990s, when the internet became public, the “First Browser War” had begun. Major players like “Microsoft” and NetScape were competing for dominance with browsers such as Navigator and Internet Explorer. To gain some advantage and make web pages more fun and dynamic, NetScape wanted to add a scripting language to its browser. Therefore, the company tasked Brendan Eich to invent such language that was required to be lightweight and easy to learn.

In just 10 days, Eich created a new scripting language named ‘Mocha’, which quickly became known firstly as LiveScript and later as JavaScript. Expectedly, a language developed for this short period of time didn’t have the best start. Its earliest releases suffered from notable security and performance issues, but developers had no alternatives. If they wanted to run programs in the browser, they had to use JavaScript.

The evolution of JavaScript

Fortunately, over the years JavaScript has undergone a huge transformation. From a programming language with regular expressions, switch and do-while, and in which JSON and exceptions were still not available, it became one of the most widely used languages nowadays with cool features such as asynchronous functions, template literals, default parameters, arrow functions, property shorthand and object deconstruction that significantly ease programmers’ lives.

The differences between the first JavaScript Standard (ECMAScript 1) and its latest version are so immense that they seem to describe two different languages. Its standards are led by the ECMA community that releases a new standard of JavaScript every single year, ensuring the language meets the latest technology trends.

Multipurpose programming language

Initially, the JavaScript framework was developed for client-side programming to create user interfaces and web pages interactivity. Some of its key features as a client-side framework were: 

  • Autocomplete
  • Loading new data or content to a page without page reload
  • Page elements animation, like resizing, fading, or relocating
  • Audio and video play
  • Dropdown menus and rollover effects
  • Validating Web forms input

All of these were great, but what made JavaScript so remarkable was the release of Node.js – a runtime environment that allowed developers to write server-side scripting using JavaScript. Node.js represents a “JavaScript everywhere” paradigm, where web-application development depends on one programming language rather than different languages for server-side and client-side scripts.

What makes JavaScript so widely used

There are over 1.9 billion websites in the world, and JavaScript is used as a client-side programming language by 97.7% of them. Today, you can use JavaScript to write all kinds of applications, including browser, server, mobile, and desktop applications. Here are some of the major advantages of the language that make it so popular:

  • Mature Community

With one of the most active and largest communities in the programming world, there is a low chance to encounter a problem that hasn’t been already tackled before. The community is still improving JavaScript every day by creating modern libraries and frameworks that are dictating how a modern web application should be built.

  • Variety of Libraries and Frameworks

You have the opportunity to choose from a long list of libraries according to your needs. Today, libraries like ReactjQueryD3.js, etc., are used in most applications across the web. Frameworks such as AngularEmber.js, and Vue.js provide optimal performance and organization to build large applications. 

  • Fast and Scalable

JavaScript is a very versatile language. It can be run on both server-side and client-side. Although Node.js is getting a lot of criticism, because it is running on a single-threaded architecture and also lack of threading environment, the traditional way of scaling multi-threaded applications is just not working for this runtime environment. Node literally means a single node in a tree of processes. It is scaled by running multiple instances of it and managing the cluster. On the other hand, client-side JavaScript is executed on the user’s system without any server interaction, which makes it fast. The processing time may vary depending on what engine the browser is using.

The beast under the hood

Another thing that makes JavaScript stand out from the crowd is the JavaScript engines. All engines work in a similar way with slight differences. They are a piece of software that highly optimises JS code and converts it into machine code.

However, over the years, JS engines have made tremendous progress. They have evolved from slow interpreters to fast, just-in-time compilers. Some of the tasks they handle include Inline caching, Garbage Collection, Compilation to Machine code.

One of the most popular engines out there is Google’s open-source engine called Chrome V8. It is used by Chrome and Brave browsers.

(image source: https://medium.com/jspoint/how-javascript-works-in-browser-and-node-ab7d0d09ac2f)

In conclusion

JavaScript has matured a lot throughout the course of the past few years. With its wide range of capabilities and daily growing community, it continues to establish its position as one of the top contemporary programming languages. However, it is difficult to predict its future in an industry that never stops evolving, but I’m really keen to see that JavaScript is already taking steps towards Machine Learning and Data Analysis with tools like Tensorflow.js and Synaptic.


More about the author:

Vladislav Petrov is a JavaScript Engineer in the Sun division of the News UK Tech team. He has 3+ years of experience in developing web applications with technologies such as React, Node.js and Angular. He is a huge fan of scalable cloud architectures.
Outside of work, he loves reading and snowboarding.

Vladislav and his team need more like-minded people to help in the development of new modern web applications. Should you be interested in joining the growing team of News UK Tech in Sofia, make sure to browse the vacancies here.