The Early Days of JavaScript

Published 12/14/2017

JavaScript is the most ubiquitous programming language in the world.

Whether you’re reading this online or from an e-book – heck, even if you bought this book from an online retailer – you used JavaScript.

Whenever you visit a website, you, most likely, are running JavaScript on your device.

JavaScript is everywhere on the Internet, controlling the interactions, validations and interfaces of the websites you visit.

And that’s just the beginning.

“Databases are now built with JavaScript,” Gunner Technology CEO Cody Swann said. “Servers run on JavaScript. Apps for your Android or iOS device run on JavaScript. Heck, even tiny gadgets that control your smart home are built with JavaScript.

“You couldn’t avoid JavaScript if you tried.”

And yet, JavaScript started small.

Really small.

Brendan Eich created JavaScript in 1995 during his time at Netscape Communications, which made the best web browser in the world at the time.

At this point, the web was static. You loaded a page and what you saw was what you got.

Form validation was cumbersome. Users would fill out a form, submit it and wait for the server to tell them if the form submission was valid.

Changing a portion of the page meant that the whole page needed to be re-rendered by the server.

No changing colors. No animation.

At the same time, web pages (called “the front end”) were not the domain of developers and engineers.

Designers – mainly coming from a photography, layout or other design background – were building websites at the time.

So whatever was to be part of the browser to make the web more dynamic should be accessible to non-programmers.

That’s where JavaScript (or Mocha as it was originally called) came into play.

“At the time, very non-technical people were the ones building the web,” Swann said. “Server code was simple. Creative types were making the innovations on the client side.”

Interestingly, this corresponded with the rise of another programming language: Java.

Sun Microsystems was making a big push for Java (called Oak at the time) and Netscape Communications was about to close a deal with them to make it available in the browser.

So why would Netscape be facilitating seemingly competitors at the same time?

The idea was that Java was not suited for the type of audience that would consume Mocha.

Java was just too big, too enterprisy for the role.

So Netscape saw Java being aimed at big, professional, component writers while Mocha would be used for small scripting tasks.

In other words, Mocha was meant to be the scripting companion for Java, just as Visual Basic was the scripting companion to C/C++ on the Windows platform.

Netscape fast tracked Mocha because of the Sun deal and to keep up in the browser wars.

This meant a number of concessions, including making Mocha, which was originally intended to be more like the languages Scheme and Self, syntactically look like Java, so that it would make sense with the marketing push from Netscape.

“It was weird,” Swann said. “You had a language that looked like one language, but acted like two other languages. That confusion persists today.”

The first release name for Mocha/JavaScript was LiveScript, which part of another Netscape marketing push in its attempt to wed JavaScript to its application server product called “LiveWire.”

Wedding the two would have created isomorphic development, with the same language used on both client and server.

Although this never came to fruition in that form, Node, decades later would finally fulfill that ideal.

However, back in December 1995, Netscape Communications and Sun closed the deal: Mocha/LiveScript would be renamed JavaScript, and it would be presented as a scripting language for small client-side tasks in the browser, while Java would be promoted as a bigger, professional tool to develop rich web components.

There was another matter complicating JavaScript’s development.

“The Netscape and Sun deal had another purpose,” Swann said. “Microsoft could see the the winds starting to change directions. They owned the desktop operating system world, but with the Internet growing so rapidly, they were realizing the Internet was going to be the new desktop and the browser was going to be the new operating system.”

They couldn’t just concede that to Netscape.”

So the Netscape / Sun partnership was as much about fighting off competition as it was about innovation.

The problem was, Microsoft couldn’t ignore the early spread of JavaScript.

Many sites were already running off of the new scripting languages, so Microsoft had to support it or risk alienating those website owners and visitors.

So Microsoft implemented its own version of JavaScript, called JScript.

Keeping “Java” off the name avoided possible trademark issues.

However, JScript was different in more than just name.

Slight differences in implementation, in particular with regards to certain DOM functions, caused ripples that would still be felt many years into the future.

“This caused so much angst among developers,” Swann said. “You had this singular language that was supposed to power the Internet, but you had browsers that, in many cases, worked very differently or not at all with the same script.”

The first version of JScript was included with Internet Explorer 3.0, released in August 1996.

“Every time something went to QA, you’d hear ‘doesn’t work in Internet Explorer’ or ‘doesn’t work in Netscape,'” Swann said. “Development times basically doubled.”

This gave birth to ECMAScript.

ECMAScript is a trademarked scripting-language specification standardized by Ecma International in ECMA-262 and ISO/IEC 16262. It was created to standardize JavaScript, so as to foster multiple independent implementations.

“That was all well and good, and today ECMAScript is followed pretty closely,” Swann said. “But back then, it was basically a suggestion. One that was largely ignored.”

And as Javascript began to transform users’ experiences online, developers began to take it more seriously and started to push the boundaries of what was possible.

“At first, developers just kind of ignored JavaScript, leaving it to designers and producers to handle it,” Swann said. “But as it began to grow, developers gave it a second look. That’s when they started to wonder what else JavaScript could do.”

That gave rise to Ajax.

Ajax allowed JavaScript to “asynchronously” load data from a remote source without interrupting the end user’s experience on the website.

“The simplest example was a stock ticker,” Swann said. “Without Ajax, you’d have to refresh your browser every second or two to see the latest price. With Ajax, you have JavaScript fetching the latest price and updating the screen seamlessly without you knowing anything is going on.”

This innovation revolutionized the web and JavaScript and harkened in the “Framework Era.”

Gunner Technology creates custom software for the private sector, public sector and entrepreneurs. Check out the company livestream on Facebook, YouTube and Periscope every Thursday at 1:00 pm eastern time or catch it on iTunes whenever you want. Check back every Wednesday at 1:oo pm for a new blog post. 

Give us a try free for 30 days!

Don't take our word for it. New clients get to try our services free for 30 days.

We'll put together a team of analysts, developers and designers to partner with you and get to work.

To get started, just fill out the form below.

They show a passion for understanding our business objectives

They show a passion for understanding our business objectives

They get the job done on time and are quite adept at using open source technology, which saves us money. Gunner balances pragmatism and perfectionism, which is important to us. After using them for both short term and long term projects, we cannot give a higher recommendation

Sam Petteway - CEO

5348 Vegas Drive
Las Vegas, NV 89108
GSA: GS-35F-306GA | CAGE: 7Q6F5 | DUNS: 078818362
© 2020 Gunner Technology
Privacy Policy | Terms of Use