In its early days the web was static. Every action, such as requesting or sending new information, was causing a full page refresh. Dynamic interactions were non-existent, and eventually, a need arose for a scripting language to address that problem. The project took on many names and interpretations in the early days. Every browser had its own unique implementation. Developing cross-browser compatibility was a herculean task. “Best viewed in X browser” banners were a common sight. The web was a mess. After more than a decade of fragmentation and stagnation, excitement rekindled. The technology soon entered its renaissance age. And AJAX was a driving force, pushing forward.
Initial versions of JS granted programmatic access to the DOM tree. While this allowed form validation and animations, it did little more. It made the web feel alive, but underneath, it remained still. AJAX and its preceding iterations made it possible to load new content without a page refresh. Variants of the technology were quickly developed by the dominating browsers of the time. The term AJAX was coined around 2005 and then standardized the following year.
Background transactions between the browser and server became cornerstone of the modern web. They would later lead to the creation of countless front-end frameworks and libraries. These would bridge the gap between desktop applications and websites. Developers now had the means to truly breathe life into the web.
Node and NPM
Until the late 2000s, JS was almost exclusively used in the browser. There were ways to run it in a Java environment with Rhino, but it wasn’t until the release of Node.js that it became a viable server option. Node is a runtime based on the V8 engine behind Google Chrome. Developers could now run standalone, performant JS code outside a browser. This enabled not only the creation of servers, but also a local development environment.
Node’s package manager was released soon after to complete the groundworks for the community to flourish. The ability to develop, distribute and access tooling via NPM was a major asset. Currently, the largest repository of packages, it is an indispensable part of web development.
Businesses didn't sleep through the news. There’s a strong advantage in writing the same language on the server and client side. Small teams can juggle between the two applications with greater ease and fewer resources. Larger ones could leverage a bigger pool of shared knowledge and practices.
A big factor for the stagnant development until 2009 was fragmentation. But that year Yahoo, Microsoft, Google and others reached an agreement. This marked a crucial step towards standardization. Disagreements around the proposal for ECMAScript 4 had clogged the release pipeline for almost a decade. With the draft abandoned, progress resumed. The release of ECMAScript’s 5th Edition, or ES5, would bring the language closer to the one we know today. Later ES6 propelled JS to not only the most used language but also to one that developers loved using. The release added significant new syntax for writing complex applications. Classes, ES6 modules, arrow functions, local scope variables, new data structures and other features made a debut. New practices and patterns emerged for JS development. Annual releases added more incremental features since 2015. The ecosystem and language rapidly approached maturity.
CoffeeScript and TypeScript
CoffeeScript, a complete programming language, came with features inspired by Python and Ruby. Some of these ideas would influence later versions of JS.
While CS has fallen out of favour in recent years, TypeScript is all the rage. It brings syntax close to programming languages such as C# and Java, but it “stays out of your way”. It’s not an entire language like CoffeeScript. It’s a superset. Valid JS is valid TS. It allows using only the features you need. That might be a big reason why it remained popular after the ES6 release.
New features are added every year. However, in the spirit of backwards compatibility, the new solutions often didn’t fix but instead superseded the problems. A prime example of this is the continued existence of the “var” keyword, or the various native ways you can make an HTTP request, all valid to this day. This is a plain demonstration of the evolution and strategy employed to improve the language.
Despite that, the language, ecosystem and community have bloomed over the past decade. As the language and the web in general mature, the tooling around them is bound to follow. And it's the tooling that provides a lot of the much-needed improvements.