From the earliest days of the web, JavaScript has been a foundational technology that drives popularity and great interest among everyone who has to deal with the world wide web. Despite its huge popularity, this unique programming language is mostly misunderstood and criticized. Many are really in love with its ease and simplicity, others hate the language just for that. No matter what they feel about JS everyone has to use it because, alongside HTML and CSS, JavaScript is one of the three core technologies of World Wide Web content engineering. So, there are few who doubt its importance at the heart of the world's most widely available software platform: the web.
To see why JavaScript is rocking the top rankings and is conquering more of the web and to get the answer to the question “Why JavaScript?”, let’s go back in time and and remember how it all started, analyze what we have now and foresee what’s coming next.
Re-Evolution of JavaScript
The story of JavaScript started when Brendan Eich started to work at Netscape Communications Corporation in April 1995. Eich originally joined intending to put Scheme "in the browser", but his superiors insisted that the language resembled Java in terms of its syntax. The result was a language that had much of the functionality of Scheme, the object orientation of Self, and the syntax of Java. The first version was completed in ten days in May 1995 and was called Mocha, but renamed LiveScript in September 1995 and later JavaScript in the same month.
While flickering mouse trails and pop-up prompts may be with what JavaScript started, nearly 20 years, the technology and capability of JavaScript have greatly changed and evolved.
ECMAScript Pathway
The first big change for JavaScript after its public release came in the form of ECMA standardization. Maybe some of you wonder why ECMA? For trademark reasons, the ECMA committee was not able to use JavaScript as the name and this is the reason that today,
JavaScript is just the commercial name for ECMAScript.
First 3 Versions
The 1st ECMAScript standard was based on the version of JavaScript released with Netscape Navigator 4, but it still missed important features․ It was released in June 1997.
ECMAScript 2, was released to fix inconsistencies between ECMA and the ISO standard for JavaScript, so no changes to the language were included. It was released in June 1998.
ECMAScript 3 was released in December 1999. This version of ECMAScript spread far and wide. It was supported by all major browsers at the time and continued to be supported many years later.
ECMAScript 4 vs ECMAScript 3.1
As soon as work on ECMAScript 4 started, strong differences in the committee started to appear. The lack of consensus and the complexity of some of the proposed features delayed the release of ECMAScript 4 further and further away. The committee that was developing ECMAScript 4 was formed by Adobe, Mozilla, Opera (unofficially) and Microsoft. When Yahoo joined the committee most of the standard and features were already decided. An influential JavaScript developer, Doug Crockford was Yahoo’s representative at the committee. He raised concerns in strong opposition to many of the changes proposed for ECMAScript 4. He pushed forward the idea of coming up with a simpler, reduced set of features for the new standard, something all could agree on: no new syntax, only practical improvements born out of the experience of using the language. This proposal later became known as ECMAScript 3.1.
There was a period when both standards coexisted, and two informal committees were set in place. ECMAScript 4, however, was too complex to be finished in the face of discordance. ECMAScript 3.1 was much simpler, and, in spite of the big battle at ECMA, it was completed.
ECMAScript 3.1 or ECMAScript 5?
In 2008 after the long-lasting disagreements around ECMAScript 4, the community focused on ECMAScript 3.1. ECMAScript 4 was thrown out from use. And in 2009 ECMAScript 3.1 was completed and signed-off by all parties. ECMAScript 4 was already recognized as a specific variant of ECMAScript even without an official release, so the committee decided to rename ECMAScript 3.1 to ECMAScript 5 to avoid confusion. So Version 5 became one of the most supported versions of JavaScript, and also became the compiling target of many transpilers. It was a small step forward and not a big improvement, for both small scripts and bigger projects.
Big Changes
ECMAScript 6, later renamed to ECMAScript 2015, brought big changes. Almost every change that required syntactic changes was pushed back to this version. The already united committee finally released ECMAScript 6 in 2015, but this time fortunately without any disagreement. This release was a big jump in the use of transpilers such as Babel or Traceur.
ECMAScript 2016 was released in the next year with a small revision. The revision was the result of a new release process implemented by Technical Committee-39.
The 8th edition, officially known as ECMAScript 2017, was finalized in June 2017. It includes await/async, which works using generators and promises. Some of the new features in ECMAScript 2017 are Object.values, String padding, Async functions, Exponentiation Operator, etc.
What’s Next?
ES.Next is a dynamic name that refers to whatever the next version is in the process of writing. The feature set of ECMAScript 2018 was finalized during the latest TC39 meeting (23-25 January 2018). Here are the major features:
Asynchronous Iteration (Gorkem Yakin, Daniel Ehrenberg)
The problem is that the previously explained way of iterating is synchronous, it doesn’t work for asynchronous sources of data. The proposal specifies a new protocol for iteration that works asynchronously.
Rest/Spread Properties (Mathias Bynens)
It enables the rest operator (...) to work in object destructuring and the spread operator (...) in object literals.
Why Is JS So Popular?
Today, new languages are emerging rapidly to satisfy changing needs of users. These languages are created to build another level of applications that have advanced features and meet demanding needs of businesses.
The choice is really wide for developers when it comes to functional, object-oriented and scripting languages. And not to lose the relevance in their field developers always try to keep their hands on the heartbeat of the industry innovations thus keeping track of new programming languages as well. The appearance of new programming languages doesn’t always mean that big changes happen all the time. A few languages always hold their place really tightly and they were around for a long time and are not planning to go away anytime soon. One of them is JavaScript that is always in the list of popular programming languages and we dare say developers are falling in love with it again and again.
According to RedMonk, an industry analyst company, JavaScript ranks as the first technology among the client-side languages and as Web3Techs (Web Technology Surveys) states it is used by 95% of websites. The web is a thing that is never going to disappear. So, as the web is forever and JS is closely connected to it, continuing to grow and evolve more and more, JS is forever, too. This is the first reason why it was, is and will be always popular.
Another reason that JS is talked about so much is its huge community of developers. It is also used by many major companies in the industry like Google, Facebook, Alibaba, Microsoft, etc. This fact undoubtedly has a big role in its popularity. But why do these giants use JS so much and generally what makes this language so attractive to so many? The answer is that JavaScript can handle and solve most of the tasks. It is powered by its unique nature, its libraries, and numerous highly popular frameworks.
General JS Mainstream Milestones
It took JavaScript a long time to make an impact. Many JavaScript-related technologies existed for a while until they were discovered by the mainstream. We picked only the most popular projects that happened throughout these two decades from the day JavaScript was created until now.
1997—Dynamic HTML
Dynamic HTML allows you to dynamically change the content and appearance of a web page. You achieve this by manipulating the Document Object Model (DOM) of the page, a tree-shaped data structure. Things you can do include changing content, changing style, and showing and hiding elements. Dynamic HTML appeared first in Internet Explorer 4 and in Netscape Navigator 4.
1999—XMLHttpRequest
The XMLHttpRequest specification defines an API that provides scripted client functionality for transferring data between a client and a server. This API that was introduced in Internet Explorer 5 allows a client-side script send an HTTP or HTTPS request to a server and receive data in different text formats (XML, HTML, JSON).
2001—JSON, a JavaScript-based data exchange format
In 2001, Douglas Crockford named and documented JSON (JavaScript Object Notation), a popular lightweight alternative to XML, that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. This makes JSON an ideal data-interchange language that uses JavaScript syntax to store data in text format.
2004—Dojo Toolkit, a framework for programming JavaScript in the large
The Dojo Toolkit is an open source modular JavaScript library for large-scale client-side web development. It eases the rapid development of cross-platform, JavaScript/Ajax-based applications and websites by providing the necessary infrastructure, which are: an inheritance library, a module system, an API for desktop-style graphical widgets, and more.
2005—Ajax, browser-based desktop-class applications
Ajax is a collection of technologies that brings an interactivity to web pages, equal to that of desktop applications. Ajax, a shorthand for Asynchronous JavaScript and XML, asynchronously loads content in the background (via XMLHttpRequest) and dynamically updates the current page with the results (via dynamic HTML). It was the mainstream breakthrough of JavaScript and dynamic web applications. The term Ajax is now mostly replaced by the more comprehensive terms HTML5 and Web Platform (both meaning JavaScript plus browser APIs).
2005—Apache CouchDB, a JavaScript-centric database
Apache CouchDB is open source database that is easy to use and has a document-oriented NoSQL database architecture. It is implemented in the concurrency-oriented language Erlang; it uses JSON to store data, JavaScript as its query language using MapReduce, and HTTP for an API. CouchDB is a very good fit for JavaScript because you can work directly with native data. Compared to relational and object databases, there is no mapping-related impedance mismatch and you avoid many complications because only data is stored, not behavior.
2006—jQuery, helping with DOM manipulation
jQuery is a fast, small, and feature-rich JavaScript library that makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with a powerful fluent-style API for querying and modifying the DOM. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript. It works across a number of browsers.
2007—WebKit, taking the mobile web mainstream
Based on prior work by KDE, WebKit is an open-source HTML engine, introduced by Apple in 2003. With the introduction of the iPhone in 2007, the mobile Web suddenly became mainstream and had little limitations compared to the non-mobile Web. The WebKit framework has two components: WebCore and JavaScriptCore.JavaScriptCore is a framework that provides a JavaScript engine for WebKit implementations. It compiles JavaScript into native machine code, thus speeding JavaScript execution.
2008—V8, a proof that JavaScript can be fast
V8 is Google’s open source high-performance JavaScript engine that is used in Google Chrome and in Node.js, among others. It changed the perception of JavaScript as being slow and made JS to rival with other browser vendors. V8 is written in C++ and can work standalone, or be embedded into any C++ application. It compiles and executes JavaScript source code, handles memory allocation for objects, and doesn’t need garbage collectors any more.
2009—Node.js, empowering JavaScript on the server
Node.js made the "JavaScript everywhere" paradigm possible by allowing web application development to unify around a single programming language, rather than rely on a different language for writing server-side scripts. Node.js is a cross-platform JavaScript runtime environment built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that runs scripts server-side to produce dynamic web page content before the page is sent to the user's web browser. npm, Node.js' package ecosystem, is the largest ecosystem of open source libraries in the world.
2009—Cordova, writing native apps in HTML5
Formerly known as PhoneGap, today’s Apache Cordova is an open-source mobile development framework that allows to build cross-platform mobile applications using CSS3, HTML5, and JavaScript, avoiding each mobile platforms' native development language and platform-specific APIs. Applications execute within wrappers targeted to each platform, and rely on standards-compliant API bindings to access each device's capabilities such as sensors, data, network status, etc.
2012—TypeScript, making JS scalable
TypeScript is a superset of JavaScript that compiles to clean simple JavaScript code which runs on any browser, in Node.js, or in any JavaScript engine that supports ECMAScript 3 (or newer). Types enable JavaScript developers to use highly-productive development tools and practices like static checking and code refactoring when developing JavaScript applications.It is an open-source programming language, developed and maintained by Microsoft.
2015—React Native, applying React architecture to native apps
React Native is the next generation of React - a JavaScript code library developed by Facebook and Instagram, which was released on Github in 2013. React Native lets you build mobile apps using only JavaScript. It uses the same design as React, letting you compose a rich mobile UI from declarative components.