DEV Community

Cover image for The History Of Javascript and Why You Should Know It
Manik
Manik

Posted on • Edited on • Originally published at cloudaffle.com

The History Of Javascript and Why You Should Know It

Having a humble beginning of starting as a language that was intended to handle browser validations to a full-blown programming language that powers a lot of desktop applications as well, JavaScript has traveled a long journey.

It's important to understand this journey of JavaScript to work with the trickiest parts of the language. Let's start from where it all began.

Why Was A Language Like JavaScript Needed?

Many years ago, back in 1995, there was a browser called Netscape Navigator (sounds like a story already;). The internet connectivity was rather very slow as people used to use dial-up connections using telephone lines and modems. So when you were supposed to fill a form on a website, which was usually coded using a language like Perl, the validation of the input fields of any form required a full round trip to the server.

This was not only a painful exercise as the internet speed was very slow but also resulted in the loss of data if the form was not filled correctly. Netscape Navigator sought to solve this problem by finding out a way to validate the input fields on the client side itself to save that complete round to the server just to validate the input fields. This is how JavaScript was born, merely as a scripting language to validate forms on the client-side.

Why Is It Important To Know The History Of JavaScript

JavaScript was born as a scripting language to validate input and it has traveled its journey of becoming a full-blown programming language that can be used to build anything from mobile apps, web applications to even desktop applications. Due to the way it has evolved, I would say that its a kind of a programming language, which might take a few hours to get started with but years to master. So when you start learning JavaScript knowing its history would help you better understand its nature, strengths, and limitations. It's easier to understand why some of the inherited problems exist and why some things behave in a certain way once you know how JavaScript evolved as a language.

The Birth Of JavaScript And The Birth Of A Conflict

Brendan Eich (then a developer at Netscape Navigator) was assigned a task of developing this new scripting language which was then named Mocha. This was intended to be released as a part of Netscape Navigator 2. Mocha was later renamed to LiveScript before the release of Netscape Navigator 2. Netscape Communications then entered into an alliance with Sun Microsystems which was then really pushing hard for promoting Java.

Just before the launch LiveScript was renamed as JavaScript to bank upon the traction that Java was getting from the press and portray JavaScript as a natural extension of Java.

Since Java was just too complicated and big for handling server-side tasks LiveScript was seen as a natural extension to Java for handling the client-side tasks. This was supposed to be a companion to Java which would take care of the heavy server-side tasks and LiveScript would make client-side validations easy. LiveScript inherited a lot of its syntax and inherited nature from Java due to these obvious reasons. Sun Microsystems helped to complete and release LiveScript with Netscape Navigator 2 and just before the launch it was renamed as JavaScript to bank upon the traction that Java was getting from the press and portray JavaScript as a natural extension of Java.

The Evolution Of The Conflict And Browser Incompatibility

JavaScript 1.0 was a huge success and internet adoption was increasing tremendously. So much so that JavaScript 1.1 was released along with the Netscape Navigator 3. By now Netscape Navigator had established itself as the leading browser in the market. At this point in time, Microsoft decided to infuse more resources into the development of its own browser called Internet Explorer 3. Soon after the launch of Netscape Navigator 3, Microsft released a new version of its web browser called Internet Explorer 3 which had an implementation of JavaScript. To avoid any licensing issues with Netscape Communications, Microsft renamed its implementation of Javascript as JScript.

This adoption and aggressive implementation of JScript by Microsoft was going to prove as a major leap forward for JavaScript. So by now, there were two different versions of JavaScript floating around with no standardization in place. This was the beginning of the browser incompatibility that we even see today. Unlike all other programming languages like C, C++, Java, etc, JavaScript had no basic standard whatsoever.

Submission To ECMA For Standardization

Since JavaScript had no standards and with the industry fears mounting over it, JavaScript 1.1 was submitted to European Computer Manufacturers Association (ECMA) for standardization in 1997. A technical committee was created with the objective of standardizing the syntax and semantics of a general-purpose, cross-platform, and a vendor-neutral scripting language. The committee consisted of developers from Sun Microsystems, Netscape Communication, Microsft, and various other companies. They came up with ECMA-262 which is a standard defining a new scripting language and a general-purpose scripting language called the ECMAScript to which all the browsers had to adhere to create their own implementations of JavaScript. Various browsers have tried with varying levels of success to adopt to ECMAScript as a standard for the implementation of JavaScript. There have been success stories as well as failures in the entire journey of adoption of this standard.

So Is JavaScript and ECMAScript The Same Thing?

The answer is No! Though you would often hear developers use them synonymously, they are very different from each other. ECMAScript is a scripting language based on the standards defined in ECMA-262 and is not tied to web browsers. It is based on ECMAScript that a more robust scripting language like JavaScript has been built.

Implementations Of JavaScript

JavaScript implementation of ECMAScript has three district parts which collectively are referred to as JavaScript.

  • The Core - This is based on ECMAScript. So the ECMAScript defines the syntax, data types, statements, operators, etc.
  • Document Object Model (DOM) - This is what the browser renders as a hierarchy of nodes to be displayed to the client or the user.
  • Browser Object Model (BOM) - This is what allows the developers to manipulate the browser window. Using the BOM the developers can access the browser features and manipulate them outside the context of the DOM or the page that is being rendered.

What's Next?

It is important to understand the three distinct implementations of JavaScript and their history to understand how it has impacted the language over a period of time. In this series of articles, we would next talk about ES6 which was the sixth edition of ECMA-262 released in the year 2015 and how it proved to be the most important enhancement to JavaScript ever made.

You can watch this space for the next article or you can subscribe to my Newsletter and I would notify you as soon as the next article is published. Don't forget to leave a like or share the article if it was helpful!

Top comments (0)