Which company has JavaScript developed?

JavaScript: origin and standardization

Here is a JavaScript documentation by molily. At the moment it is still patchy, but it is gradually growing. Comments and feedback are welcome by email.

To the table of contents

Who defines what JavaScript is?

In contrast to HTML and CSS, there is no central, closed technical specification that defines what JavaScript is and what a JavaScript-enabled browser must be able to do. Rather, JavaScript is a patchwork of various specifications and industry standards issued by various companies and bodies. This makes the situation difficult and confusing for beginners.

In addition to the clearly defined language core, there is a wealth of techniques that can be used via JavaScript. One speaks of so-called APIs (engl. application programming interface - programming interfaces). The advancement of JavaScript consists in large part of the fact that new APIs are invented and implemented (implemented, supported) by the browser.

»JavaScript« is therefore an open term that summarizes all scripting based on ECMAScript. There are historical reasons for the simplistic use of JavaScript today. JavaScript is a mishmash of different, non-coordinated technologies.

Beginning with Netscape JavaScript and Microsoft JScript

The name JavaScript is a trademark of Netscape, which launched the language in 1995. Netscape released various JavaScript specifications in the 1990s. These were manufacturer's own, so-called proprietary inventions. The specifications documented the techniques used by the in-house browser Netscape Navigator supported.

The background to the development of JavaScript was the so-called browser war. During this time, the companies Netscape and Microsoft upgraded their browsers with proprietary techniques in order to steal market share from their competitors. Microsoft quickly recognized the usefulness of JavaScript and implemented the JavaScript specification in its own browser, Internet Explorer. For trademark reasons, Microsoft named its JavaScript implementation JScript. Its own name was accompanied by its own additions and peculiarities, whereby Netscape's JavaScript and Microsoft's JScript developed apart.

It was a horror for web developers to have to grapple with different approaches in the same language to achieve the same thing across browsers. Microsoft and Netscape saw this and tried to standardize the language through independent bodies. The result was two specifications that still cover most of what we understand by JavaScript today.

ECMAScript standardizes the language basics

The basics of JavaScript were developed in ECMAScript set. ECMA is a standardization organization that publishes the technical specification. The decisive factor is currently eighth edition from 2017 (ECMAScript 2017, Edition 8).

ECMAScript is kept abstract and excludes the framework that is characteristic of JavaScript (windows, documents, nodes, events, etc.). Instead, ECMAScript defines a versatile meta-language, a basic framework for many possible programming languages. ECMAScript describes syntax rules, basic object types and the processing of programs. As a result, ECMAScript not only provides the heart of JavaScript, but is also used in other places - also on the server side, by the way.

The ECMAScript specification is aimed at specialists who develop a parser or interpreter. The descriptions are kept short and as formal as possible. The specification is incomprehensible to mere mortals, making it unsuitable as a practical reference. You can still read the official specification.

The DOM standardizes document access

On the other hand, a standardization of the access to the HTML document was necessary. Both Netscape and Microsoft invented their own DHTML models. DHTML stands for dynamic HTML. Both models, however, were limited, ill-conceived and, to top it all, incompatible with each other.

The World Wide Consortium (W3C), originally responsible for standardizing HTML and CSS, eventually came to the rescue. In cooperation with the browser manufacturers, the so-called Document Object Model (DOM) Developed. Today, parts of the DOM are maintained by another standardization group, the Web Hypertext Application Technology Working Group (WHATWG).

Overview of the DOM standards

The DOM is not a single technical specification, but a family of specifications that build on one another and complement one another. Most of the interfaces defined in it can be used via JavaScript, but they are defined independently of the programming language.

  • The Core DOM describes an object model that can be applied to documents in markup languages ​​such as HTML and XML. The DOM does not only refer to HTML documents.
  • The HTML DOM regulates special features and simplifications when accessing HTML documents.

The core DOM and the HTML DOM are the most important reference points for JavaScript programmers. Much of the programming consists of using these techniques.

There are other DOM specifications, two of which are of particular interest for JavaScript programming:

  • DOM events describes the processing of events (e.g. user input) in the document. (See Event Processing.)
  • The CSS Object Model (CSSOM) enables access to the presentation of the document. CSS properties and central style sheet rules can be read and changed via this. (See Controlling the appearance of documents.)

The actual specifications are:

HTML 5 integrates various standards

Originally the World Wide Consortium (W3C) was responsible for the standardization of HTML. In 2004 the demand arose to make the web fit for complex and dynamic web applications. Web applications that are mainly powered by JavaScript. Out of dissatisfaction with the W3C's course, the Web Hypertext Application Working Group (WHATWG) was founded and began to further develop the idle HTML specification in small steps.

The WHATWG gradually gained the support of various browser manufacturers and well-known web companies. In 2007 the W3C turned around and began developing HTML 5 based on the WHATWG draft. Finally, in 2014, the W3C officially adopted the HTML 5 standard.

The WHATWG continues as a body, so that HTML is currently being further developed by two groups and organizations. While the W3C publishes completed standards with version numbers (5, 5.1, 5.2 etc.), the WHATWG is working on a continuously updated specification without a version number.

Before HTML 5, the HTML specification only defined a markup language. Access to HTML documents with JavaScript, the HTML DOM, was defined in a separate specification. Since HTML 5, the HTML specification defines both the markup language and the DOM interface.

The main concern of HTML 5 was to standardize common and proven JavaScript techniques for the first time. Paving the cowpaths"Paving the beaten track" is what the editors call the concept of describing existing techniques in a detailed and binding manner. It was not until HTML 5 that the HTML-specific object environment was defined at a central point - including the top, global object.

ECMAScript 5 makes JavaScript programming more robust

When ECMAScript Edition 3 was adopted in the late 1990s, it was not foreseeable that one day huge web applications with thousands of lines of code would be developed. Large-scale JavaScript development brings with it certain requirements that the underlying ECMAScript did not meet. It became obvious that ECMAScript needed further development.

Initially, drafts for ECMAScript Edition 4 were worked on. The aim was to fundamentally change the language. However, this conversion was postponed in favor of a small-scale expansion. The drafts for Edition 4 ended up in the drawer. To avoid misunderstandings, version number 4 was skipped. Work began on Edition 5, which was finally adopted in 2009.

ECMAScript 5 is a downward compatible further development of ECMAScript 3. The fifth edition mainly eliminates errors and ambiguities, but also comes up with some new features.

The most important innovation is the Strict fashion. JavaScript code can be executed in two ways: the traditional, lenient mode and the new, strict mode - the strict mode. The latter eliminates numerous pitfalls that made JavaScript programming difficult. Strict mode makes it possible to write robust and secure code that does not use problematic techniques.

The strict mode can be switched on in the JavaScript code using. So the programmer must explicitly consent to the code being executed in strict mode. This is the backward compatibility of ECMAScript 5. Nothing changes for old, existing code, but new code can benefit from the advantages of strict mode.

ECMAScript 6 takes a big step forward

The planned radical reorganization of the language was only postponed, not canceled. Work was carried out on a comprehensive extension of ECMAScripts under the code name »Harmony«.

Finally, in 2015 ECMAScript 6 adopted. Since then, a new ECMAScript edition has been published every year. Therefore, the language now bears the year number in addition to the issue number. The full title is therefore ECMAScript 2015, Edition 6.

ECMAScript 6 introduces several language capabilities that use a new syntax. As a result, ECMAScript 6 is no longer downward compatible. A browser that only knows ECMAScript 5 cannot process scripts with ECMAScript 6 techniques.

The most important new features of ECMAScript 6 include declarative classes and a module system. We'll get to know classes in a later chapter. The module system enables several JavaScript files to be linked with one another in a targeted manner. This allows one JavaScript file to use the objects of another file. This was possible before, but such dependencies could not be expressed directly in JavaScript.