JavaScript, for web apps

Since Netscape created JavaScript to program dynamic HTML pages, applications have continued to expand.

Its main function and scripting a HTML page or a graphical interface (see Qt, XAML, etc ...). This allows the exchange of data with the server through Ajax, WebSockets, WebRTC.
But it is used also to enable scripting in some applications (Photoshop uses JavaScript) and even for system programming!

A rose in JavaScript

JavaScript was successively called Moka, then LiveScript and finally in agreement with Sun, JavaScript.
JScript is a compatible version implemented by Microsoft in 1996, for Windows only.

Its conception is a mixture of C and Self according to the author, Brendan Eich, who was also had a background in Scheme The language has many flaws, but it is innovative and flexible, and although it is more than 20 years, it offers more dynamism than most newer languages​​, such as Dart. And implementers are working to suppress all theses flaws.

To complement ECMAScript 6 which makes JavaScript a full-fledged application language, Google has proposed in 2015 the SoundScript mode which also provides typed variables and different accelerations at runtime. But this project was abandoned in February 2016 and the team was reassigned to Dart. Typed variables are however planned in a future version of ECMAScript.

Short history of the language

An ingenious and innovative language

The format described here is ECMAScript 1.5, the standard defined by the ECMA group in 1999. More recent version exists, but not supported by all browsers.

JavaScript in LightTable
Example of code: loop on a string

Some flaws of the language...

ECMAScript 7 for bigger and modular apps

The new versions of JavaScript while preserving the compatibility of this language make it safer to develop huge applications. You can write ES6, ES7 code and translate for compatibility with any browser by a tool like TypeScript (Microsoft), Traceur (Google) or Babel.

To see what is implemented, view the test of implementation of new JavaScript features with this browser.
To enable some of these features in Chrome, you must type chrome: flags and Enable Experimental JavaScript.

Reference: ECMA Standard Specification for 7th Edition. 2016.

What JavaScript interpreter for each browser?

Browsers compete on JavaScript engines like on renderers... But there are now JIT compilers rather than interpreters...

Nashorn produces bytecode for the JVM. Not integrated to any major browser.

A system language?

With the advent of JavaScript compilers, operating both in the browser or as a standalone tool, new uses are emerging for this C-like language but even freer, and with an automatic memory management, a sandbox.

JavaScript is it slow on mobile?

The controversy was started by an article by Drew Crowford that JavaScript is too slow because mobiles have little memory compared to desktop computers.
But other language specialists do not agree and believe that the culprit is not the language, it is the DOM. We know that DOM is slow, which is why some frameworks like Angular have implemented data-binding that allows to update the content without going through it.
The writer adds that in fact, JavaScript can be faster than other languages ​​like Objective-C (used on iOS) in exchanging messages because it is something that works better with a JIT than with a static compilation.
Finally, the author attributes the speed of native iOS apps to the fact that the screen is one size, unlike Android or other systems.


Even if the language is relatively easy to learn, it has dark spots, so that there are books specializing in the good parts of the language, others on complex issues.

Compiled to JavaScript

You can develop a JavaScript app in an IDE as LighTable (see image above), Eclipse, NetBeans or Aptana, or a simple script with any editor.

JavaScript at command line
Extensions and frameworks

It is strongly recommanded to use an Ajax framework or an HTML 5 library to build a serious application. There are also frameworks for mobile apps.

Programming and data languages Asm.js - Basic - C - C++ - C# - Dart - Go - Java - JavaScript - Julia - Pascal - PHP - Prolog - Python - Ruby - Rust - Scala - Scriptol - Swift - TypeScript - HTML - Wasm - XML - XAML - SQL
News and comments

JavaScript is now the language of applications on Linux

February 5, 2013 19:06:01


More specifically applications for the GNOME desktop environment, which so is following in the footsteps of Windows 8 and its modern interface. Other languages ​​are possible, but the first choice is JavaScript. The advantages are numerous: greater portability, a larger ecosystem, a broader audience of developers because JavaScript is known to almost everyone.
Obviously this causes protests because each developer has his favorite language (C, Python, Ruby, etc.), he would have wanted selected for this role.
The other reference environment, KDE is based on Qt, which also uses JavaScript for the interface and C++ for applications. However, the Plasma interface, which is equivalent to Metro for Linux, allows the rapid creation of JavaScript applications with the IDE Plasmate.