The History of Javascript

Javascript is in all areas of development from hardware to software.

We’ve already looked at some concepts of Javascript with Javascript Basics, Arrays in Javascript & Objects in Javascripts. While writing those blog posts I continually thought how did Javascript become to be. That led to this topic, knowing the history of any language can help enhance your understanding of the language.

Netscape & The Birth of Javascript

Back in May 1995, the internet was becoming popular. The web back then was just static pages that were often text-heavy, the best ones had images floated to the left or right. Not exciting when you compare it to the web today. But that’s when a company called Netscape Communications made the first commercial web browser Netscape Navigator.

Soon after releasing the founder of  Netscape Marc Andreessen thought the web needed to be more dynamic. Animations, interactions and other forms of small automation needed to be the future of the web. To achieve that future the web needed a scripting programming language that ran in the browser but it also needed to be development friendly so it was easy to use for less experienced web designers and programmers.

The job was given to Brendan Eich who was already working at Netscape to embed a different type of programming language called Scheme into Netscape Navigator. He moved project and in just ten days he created a new programming language named Mocha the early name for Javascript. The name Mocha was the development name for the new scripting language it was later changed to LiveScript when shipped with Netscape Navigator 2.0.

Shortly after that with a bit of Marketing to cash in on the success of then-popular and upcoming language Java. LiveScript was renamed again to the name we know it today Javascript. Other then both being a programming language Java & Javascript are not related.

The Javascript Standard

When Javascript was released by Netscape with its Navigator Browser it became a game-changer to the user web experience. Like anything when it becomes successful competitors will take notice. One of those competitors Microsoft created their version of Javascript named JScript since Javascript was already a trademark. Jscript wasn’t just a different name it had slight differences in DOM Functions. Jscript first released in August 1996 with IE.

The differences between Javascript, Jscript and other types made it difficult for designers and developers to make websites that worked in all browsers. It became time-consuming and expensive to develop a website using Javascript. Javascript became frustrating for developers and wasn’t moving the web forward. At the time Javascript wasn’t standardized so there were no guidelines for how it should be implemented in browsers.

In 1997 Netscape decided to change that. They submitted Javascript to the standards organization ECMA international for consideration as the industry standard. ECMAScript became the official name used to refer to future versions of the language. The language was standardized under a technical committee at EMCA known as TC39. The TC39 committee is made up of representatives from different companies including Google, Microsoft, Netflix, Facebook and Paypal. Their job is for creating, approving and denying language features.

The standardization of Javascript would open it up to a wider audience whilst keeping other implementations like Microsofts JSscrpt consistent making it all types of Javascript compatible across browsers. The first release of ECMAScript was in 1997. Newer versions 2 & 3 were released soon after with every release new features where added. But with Javascript growing it language became more complex. By the time ECMAScript 4 came into development, the TC39 could not agree on a feature set. By 2003 TC39 had stopped working on the ECMAScript 4 spec altogether due to the disagreements on how to improve the language. For years there where no major changes or new features added to the language.

In 2008 the TC39 committee came back together to work on ECMAScript 3.1 that was later renamed to ECMAScript 5 skipping 4 altogether. ECMAScript 5 added a lot of major features like JSON support, Getters & Setters on Objects, new array methods like forEach and map. Although ECMAScript 4 was abandoned some of its features made is was into ECMAScript 6 which was released in 2015 and is the current ECMAScript at the time of writing this post.

Types of Javascript

In the industry, you often hear terms like vanilla or plain Javascript it’s just how developers refer to Javascript without any frameworks or libraries. We know that ECMAScript 2015 or ES6 is the latest version of vanilla Javascript. But Javascript also comes in other forms for example.

Typescript was created by Microsoft, it’s a strict syntactical superset of JavaScript, and adds optional static typing to the language. The browser cannot understand a file written in Typescript so it needs to be compiled to standard Javascript code so it can run.

Flow created by Facebook and similar to Typescript is an open-source type checking library that makes developing app more maintainable and performs checking to easier to catch bugs.

CoffeeScript adds syntax sugar to Javascript that makes it in an effort to enhance JavaScript’s brevity and readability. Its also not understood by browsers and needs complied into standard Javascript.

Dart is an object-orientated javascript language made by Google. Developers use Dart to create highly complex and easily scalable apps for the web, mobiles, and IOT Devives.  Dart has been approved by ECMA like vanilla Javascript. Dart uses a different syntax than vanilla Javascript but it can be translated into vanilla so it can be used into a browser.

Jquery was made so simplify Javascript making it easier to learn. It takes a lot of common Javascript tasks that need lots of code to write in vanllia and wraps them into a single line. The Jquery contains features like DOM traversal and manipulation, event handling, Animation and even Ajax. Unlike the previous types of Javascript we’ve covered, Jquery doesn’t need to be compiled and will run in all major browsers.

Where is Javascript Today

Although the origins of Javascript started in the browser it has now evolved beyond that to become a multi-platform language. The most common place you’ll encounter Javascript is on the web. Developers use Javascript to make websites more engaging with things like 3D graphics, animations, transitions and more. It’s also possible to build native apps that run both on iOS and Andriod using Javascript frameworks like React & Ionic. You can even find Javascript in Desktop applications like the text editor Visual Studio Code and popular messaging apps like Slack. It can be used to control hardware with IoT devices. Internet of Things devices are any physical device that can be turned on and off when connected to the internet or can connect with other devices. Common IoT devices are anything from Fitbit, smart hubs and smart home services like Alexa.

Wrapping Up

Don’t be surprised if you find out javascript is being used to controls wifi enables devices like your coffee machine, fridge or washing machine. As you can see gone or the days when Javascript is just a browser-based language and why it’s one of the worlds most popular programming languages. Thank you for reading, and being part of the discussion. If you would like to chat or have any questions drop me an email I’m always happy to talk.