Between Java and HTML: How JavaScript became the main language of the web

JavaScript turned 25 on December 4th – reason enough to take a closer look at the history of the programming language.

Today, JavaScript is behind almost 95 percent of all websites, including the largest – Youtube, Facebook and Twitter. However, the beginnings of the programming language were rather bumpy. Brendan Eich, the outstaffing developer of the specification, invested just ten days in developing the first prototype. In addition, the language was frowned upon by “real” programmers for a long time: In development circles, JavaScript was initially considered an unfinished script language at best, but by no means a programming language to be taken seriously.

A scripting language for the Netscape Navigator

The early 1990s was an important time for the internet. In 1994 Netscape was founded – alongside Microsoft one of the first companies to produce a web browser. Brendan Eich was hired by Netscape in 1995 to develop a programming language for their browser, the Netscape Navigator. The catch for him was that he was able to base the new language on a Lisp dialect called Scheme – which, among other things, led to JavaScript having so-called clojures. Self is another programming language whose influence is still noticeable in JavaScript today. The prototypical inheritance in JavaScript comes from Self – even if the implementation of the concept in JavaScript is not quite as elegant as its model.

In the same year Java found its way into the available browsers. The technology, so-called Java applets, was introduced in order to be able to execute programs on the client side in the web browser. The technology quickly gained popularity. It is considered to be one of the reasons for the success and rapid spread of Java. This popularity is also due to JavaScript’s somewhat unfortunate naming. In May 1995 the language was still called Mocha, was briefly renamed LiveScript and in December of the same year it was finally converted to JavaScript as part of a license agreement between Netscape and Sun.

With Java applets there was already a way to bring interactivity into the browser. Nonetheless, Netscape saw the need for another programming language for the web at the time. It was then that the term web designer came up. JavaScript should serve as a kind of glue between components, i.e. images, plugins and Java applets – a language that part-time programmers and web designers would also be able to use quickly. “Back then, Java was the ‘component language’ used by highly qualified programmers. JavaScript, on the other hand, was seen as a tool for designers; they used the language to build components and automate interactions. In 1995 the web did not offer many programming options. There were Java applets. But to use it, developers needed more than basic knowledge of the very complex language, ”said Eich in a 2008 interview.

Java as a name and syntax model

One of Netscape’s specifications at the time was that the syntax of the “glue language” should be based on that of the then trend language Java, which ruled out the perhaps more obvious choice of one of the scripting languages ​​already available at the time as a syntax model. The fact that he had to finish his prototype at lightning speed and that it was then deployed without major revisions is what Eich still blames for the sometimes idiosyncratic design of the programming language.

Apart from the similar naming and a distantly similar syntax, JavaScript and Java have little in common. In order to run Java programs in the browser, the code must first be compiled. JavaScript, on the other hand, is executed during runtime and was therefore much more dynamic by design.

Although JavaScript did not perform particularly well in the beginning and was rather ridiculed by “real programmers”, it was the UI glue language of non-developers and designers that gave the web a massive boost in the 1990s.

In 1997, Netscape handed over the task of creating a language specification for the rapidly growing language to the European Computer Manufacturers Association, or ECMA for short. Founded in 1961 with the aim of developing standards for hardware, software and data processing and communication systems, the industry association is now primarily responsible for the ECMAScript specifications for the ECMA script languages ​​JavaScript, which are summarized under the name ECMA-262 , ActionScript and JScript known.

In the following two years, between 1997 and 1999, ECMA-262 was revised three times. The fourth version, ECMAScript 4, lasted a full ten years until it was abandoned in 2009 and replaced by ECMAScript 5. The reason: disagreements about the further development and thrust of the specification. Interestingly, some of the then controversial proposals for new functions have been taken up again in newer ECMAScript specifications. The Harmony project, from which the parties involved in the development of JavaScripts decided in 2008 to reverse the controversial ECMAScript 4 proposals, came to an end in 2015 with the publication of ECMAScript 6.

In the meantime, the adhesive language, initially ridiculed, had finally blossomed into a programming language to be taken seriously. In 2005 Ajax came up and changed everything. Ajax stands for Asynchronous JavaScript and XML. The technology made it possible to load individual components of a web application asynchronously when required and thus made client-side, dynamic web apps possible in the first place. For the first time, it enabled JS developers to give their web pages a UX that almost came close to that of native desktop apps.

In the mid-noughties, the still young JS developer community faced numerous challenges. JavaScript programs for executing simple actions often consist of a comparatively large number of lines of code. Browser compatibility issues did the rest to make life difficult for JS developers. As a result, the first large JavaScript frameworks and libraries were created at this time. Probably the most influential at the moment: jQuery.

CommonJS paves the way for Node.js

In 2009, the CommonJS project was supposed to drive the development of JavaScript outside of the browser by providing a way for the first time to package code and functionality into modules that can be executed outside of the browser. CommonJS laid the foundation for the development of Node.js and JavaScript conquered backend programming.

Today, JavaScript can be found in more GitHub repositories than any other programming language – and the trend is rising. A large number of JavaScript frameworks and libraries do the rest to fuel this development. Ember, React, Vue or Angular also allow small development teams to write complex web applications that would often be many times more complex without them. JavaScript is also gaining popularity in the development of native mobile apps because it allows code to be easily shared between the two worlds.

The variety of frameworks and libraries, each with their own syntax and logic, led to a kind of countermovement towards the end of the 10s, towards a use of the language that was more focused on the origins of JavaScript. Web components and ES modules are just two of the approaches that could further define the future of JavaScript. Even if JavaScript is changing with the advent of modern browser technologies – Web Assembly anyone? – will in the future increasingly share its share of the web with other languages ​​such as Rust, C or C ++, the programming language will remain one of the hottest tips not only for budding developers in 2021 and beyond.

You might be interested in that too

Ready to see us in action:

More To Explore
Enable registration in settings - general
Have any project in mind?

Contact us: