A brief history of JavaScript

A brief history of JavaScript

JavaScript was created by Brendan Eich in 1995 during his time at Netscape Communications. It was inspired by Java, Scheme and Self.

Image for postNetscape Navigator market share (source)

Netscape, for a time, made the best browser in the world and enjoyed market dominance.

In late 1995, when Microsoft cottoned-on to the competitive threat the Web posed, the Internet Explorer project was started in an all-out attempt to wrestle control of the emerging platform from Netscape.

In so doing Microsoft became a mortal threat, compelling Netscape to respond. First, they started a standardization process to prevent Microsoft gaining control of the JavaScript language. Second, they partnered with Sun to leverage their shared interest in breaking the Microsoft monopoly.

Sun began development of Java in 1990 in an attempt to write a language for ?smart appliances?. This approach floundered and in 1994, Sun regrouped and set sights on the Web as the delivery platform of choice.

Image for postSun did have a browser in 1995 before the Netscape partnership, but it was slow and resource hungry. (source)

So the Netscape/Sun partnership meant Sun acquired the use of a competitive browser and a delivery system for their strategic technology.

Netscape, on the other hand found a powerful ally against Microsoft. They also aimed to out-manoeuvre Microsoft by being the official browser of the highly anticipated platform that was Java.

Brendan Eich has said that with Sun on board, they decided to surf the tidal wave of hype surrounding Java and position JavaScript as the companion language to Java, in the same way Visual Basic was to C++. So the name was a straightforward marketing ploy to gain acceptance.

Netscape?s Mocha (later JavaScript) aimed to turn the web into a full-blown application platform. Furthermore, when used together with their LiveWire application server product, it would enable isomorphic development, with the same language used on both client and server.

If this sounds familiar, it is because this was exactly what Sun was attempting to pull off with Java. At the time however, the Web was very limited when compared to Java; for example, drawing pixels was not possible in JavaScript as it is now with canvas. So Sun (erroneously, I believe) never saw the language as a competitor and the alliance held.

Unfortunately for JavaScript, its early market positioning outlived its usefulness and later became a brake on market acceptance as it emerged as a viable technology in its own right.

So JavaScript was conceived as a scripting language for the Web for both client and server side. It was then quickly re-positioned as a Web ?companion? for Java.

The unique circumstances of the birth of the language, including:

  • the aforementioned marketing ploy,
  • time-compressed initial development,
  • a prejudice that development for the Web was not ?serious?,
  • the ubiquitous and ?unbreakable? deployment environment (the Web), and
  • the inclusion of language design elements unfamiliar to most developers

?led to a years-long period of misunderstanding, scorn and, yes, even hatred for the language. In the late 1990s and early 2000s even the authors of some books on JavaScript didn?t understand the fundamental elements of the language.

Douglas Crockford was one of the pioneers of the rediscovery of the language. And the importance of his invention of the JSON data format using a subset of JavaScript syntax should not be underestimated. During the 2000s mindshare slowly shifted to view JavaScript as a serious language: a critical mass of developers emerged who understood the language.

However, the ?outsider status? of JavaScript continues to reverberate. Early design choices like automatic semicolon insertion (ASI), the event loop, lack of classes, unusual inheritance (prototypical) and type coercion are laughed at by people who have not taken the time to understand the thinking behind them.

Developers watch other developers laughing at these features and infer that these features are worthy of ridicule and the cycle continues.

Even Brendan Eich, the creator of the language, is occasionally apologetic for design decisions he made for the language.

However, in my view these expressions of apology should not be taken as confirmation that those decisions were wrong: but rather acknowledgement of the necessary inability of one language to please all developers.

As we will see in later posts, criticisms of JavaScript are frequently insubstantial expressions of unfamiliarity or syntactic ?taste?, by programmers more familiar with other languages.

This is not to say the language is without flaws: the continuing lack of a decimal number primitive is unfortunate.

Summary

JavaScript has a rich and fascinating history. It continues to be one of the most hated languages on the planet, often for reasons that have long since faded into irrelevance.

LiveWire and the powerful nature of the language betray the true ambitions of Andreessen and the Netscape team, foreshadowing a possible future beyond being just a Java companion.

The huge companies that dominate the technical landscape have repeatedly tried to supplant JavaScript. First Sun, then Microsoft (VBScript), then Adobe, then Microsoft again (Silverlight), then Google, and then, arguably with TypeScript, Microsoft yet again. And yet JavaScript continues to thrive.

JavaScript has become the de-facto standard programming language of the Web, not only because of its first-mover advantage, but because it is open, standardized, and, most importantly a very good language; well-suited to the Web with its dynamic nature and tight integration with the DOM.

This series continues with Value types, reference types and scope in JavaScript.

My name is Ben Aston and thank you for reading my post today. I am a London-based JavaScript consultant, available for short-term consultancy globally. I can be contacted at [email protected].

If you would like to further develop your knowledge of JavaScript you might be interested in my hands-on training course. Full details can be found online at www.learnjavascript.london.

If you enjoyed this piece, please let me know by clicking the ?recommend? button below.

You may also be interested in my post on closures in JavaScript.

Image for postMade in the United Kingdom

7

No Responses

Write a response