JavaScript — 101.

Everyone has their own way of learning new material | concepts. Its important for one to ‘learn how they learn’ these new concepts. Overtime, i’ve realized a two-step process that often works whenever i attempt learning something new;
1. have an overview[or scope] of what it is you’re trying to learn, &
2. dive into the little[small details] one-at-a-time.
In the case of learning JavaScript or any programming language, its helpful to learn that new language whilst building some sort of program or application for fun on the side.
However, in this blog, i will focus on the 1st step above:
having an overview[the big picture or scope] of what it is [Javascript] i’m trying to learn. In this case, the scope is sub-divided into 2 different portions;
a) Javascript from the beginning (bit of language history for context).
b) application of JavaScript currently.
JavaScript from the Beginning:
Having a context of when the language was invented, why it was invented, and who actually invented it- gives a great starting point for the big picture.
Netscape Corporation, in 1995 hired Brendan Eich with a goal of embedding Scheme programming language into their Netscape Navigator(browser). Netscape’s collaboration with Sun Microsystems, a game-changer with its Java programming language, forced Netscape to build a Java-like scripting language for the web, “the result was a language that had much of the functionality of Scheme, the object orientation of Self, and the syntax of Java.” This language was initially called Mocha, and was later re-named to LiveScript and then finally JavaScript in September of 1995.
Brendan Eich, built ‘Mocha’ in 10 days in May of 1995, hence the invent-or(tion) of the modern-day Javascript.
JavaScript, a client-side scripting language took web-browsing to the next level in the mid 1990’s onwards. NetScape developed a javascript run-time environment, SpiderMonkey that was embedded in its browser as an engine for ‘interpreting’ the javascript source code into byte or machine code. Different versions of the language have been implemented with feature enhancements to make browsing the web more efficient and with quicker response.
In the following year, 1996, Sun Microsystems’ competitor Microsoft, developed their own version of Javascript, and named it JScript. JScript ran on Microsoft’s Internet Explorer browser. There was growing conflict between the two companies, as each one had different ways to implementing features used on the browsers. This led to the need to have a standard of writing scripting languages for the web. ECMA set the standard for writing client-side scripting languages for the web. This eventually led to re-naming JavaScript to ECMAScript as the official name by ECMA. ECMAScript was the new name and different versions were created in the years that followed.
Below is a run-down of the ECMAScript [Javascript] versions over the years, each with the new features added. brief descriptions pulled from (w3schools)
Year [Name] Description
1997 [ECMAScript 1] First Edition.
1998 [ECMAScript 2] Editorial changes only.
1999 [ECMAScript 3] Added Regular Expressions. Added try/catch.
2000 [ECMAScript 4] Was never released.
2009 [ECMAScript 5] Added “strict mode”. Added JSON support.
2011 [ECMAScript 5.1] Editorial changes.
2015 [ECMAScript 6] Added classes and modules.
2016 [ECMAScript 7 ] Added exponential operator, Array.Prototype.Include
Its important to note that Microsoft’s Internet Explorer dominated the market in the 2000s, thus JScript enjoying more relevance for a long while as the main client-side scripting language of the web. This almost led to JavaScript dying out up until late 2008/09 period. During the [2008/09] period, Google had been developing its own JavaScript engine (Chrome V8) for its Chrome browser. V8 was so powerful as it improved Javascript performance on its web browser. As Google’s Chrome became the leading browser, JavaScript found its way back on the top as the main client-side scripting language of the web.
By 2008/09, alot of web browsers had sprung up and each one had its own javascript engine that attempted optimizing the recent ECMAScript features released.
Below is a list of browsers with their Javascript engines.
- [Browser]: [JavaScript Engine]
- Chrome: V8.
- Opera: Carakan.
- Internet Explorer: Chakra (JScript Engine).
- FireFox: SpiderMonkey.
- Safari: Nitro.
- etc
Application(s) of JavaScript:
Chrome’s V8 engine was a massive game changer; as its browser performance out-classed most of the other browser’s in efficiency. As a result, Javascript gained ground again after a long spell (almost 9years) of Microsoft’s JScript dominance. Most of the browsers still had engines that used interpreters that translated the source code to byte-code, which run slow on the client-side. What made V8 powerful was its ability to compile javascript source code directly to machine code before executing it. This ability led to much larger usage of Javascript, not just as a client-side scripting language, but as one that could be used as a server-side scripting language as well.
Javascript was initially limited to running on browsers alone: Chrome’s V8 engine allowed compiling of JavaScript code directly to machine code: thus JavaScript could technically be run on a standalone system as well, like server. In May of 2009, Node.js was created, it allows creating javascript applications on the server-side, utilizing chrome’s V8 engine as a run-time environment. With the creation of Node.js, Javascript officially became a full-stack language that would be used to build entire web-applications, on both server-side & client-side — rather than using different languages for server-side and client-side scripts.
Node.js has expounded the usability of Javascript, leading to new technologies that enhance the experience of building web applications using entirely javascript new frameworks. One such technology term “MEAN Stack” sums it up: it includes Angular.js a new javascript client-side web-framework for building web applications, Express.js another web-framework for building APIs and web-application development, utilizing Node.js & finally MongoDB that uses JSON for its database implementations. At this rate, JavaScript is becoming more dominant as a viable full-stack language.
I hope this brief blog has been helpful in attempting to demystify the evolution of JavaScript from its inception to where it is currently.
sources:
- https://en.wikipedia.org/wiki/JavaScript
- https://en.wikipedia.org/wiki/List_of_ECMAScript_engines
- https://en.wikipedia.org/wiki/MEAN_(software_bundle)
In my next blog; I will attempt going in depth to understand the different versions of JavaScript including improvements made from: adding classes & interfaces in the recent versions -to- planning to add async/wait functionality in the upcoming versions (or recently added, as in last month).