JavaScript for Web Applications

Since Netscape created JavaScript to program dynamic HTML pages, its applications have been constantly expanding.

Its main function and scripting of the HTML page or GUI (see Qt, XAML, etc. This allows communication with the server via Ajax, WebSocket, WebRTC.
But also used to enable scripting in applications (Photoshop uses JavaScript) and even for system programming!

Une rose en JavaScript

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

Its construction is a mix of C and Self according to author Brendan Eich, who was also a lover of "The Scheme." The language has many flaws, but it's innovative and flexible, and while it dates back more than 20 years, it offers more options than most later languages like Dart. And implementers are working to address these shortcomings.

To complement ECMAScript 6, which makes JavaScript an independent application language, in 2015 Google proposed a SoundScript mode that also brings typed variables and various runtime accelerations. But this project was abandoned in February 2016 and the team was reassigned to Dart. However, typed variables are provided in a future version of ECMAScript.

A brief history of the language

Inventive and innovative language

The format described here is ECMAScript 1.5, defined by ECMA in 1999. Later versions exist, but are not supported by all browsers.

JavaScript dans LightTable
Sample Code: Display Line Items

Some language flaws...

ECMAScript 7 for critical and modular applications

New versions of JavaScript, while maintaining compatibility, make this language a safer tool for developing large-scale applications. ES6/ES7 code can be written and translated for compatibility with any browser, such as TypeScript (Microsoft), Tracer (Google) or Babel.

Some new features have already been implemented in a particular browser. To find out what is implemented in the browser, use it to view tests of the implementation of new JavaScript functions.
To enable some of these features in Chrome, you need to enter chrome: flags and Enable Experimental JavaScript.

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

Which JavaScript interpreter for which browser

?

Browsers compete on JavaScript engines, as well as on rendering engines... But now it is more JIT compilers than interpreters...

Hashorn produces baytecode for JVM. Built into no major browser.

System language

?

With the advent of JavaScript compilers, working both in the browser and as an independent tool, new ways of using this language, close to C, but freer and with automatic memory management, sandbox, appear.

Does JavaScript work on mobile devices?

The controversy was sparked by Drew Crawford's article that JavaScript is too slow because mobile devices have little memory compared to desktop computers.
But other language experts disagree and believe the culprit is not language but DOM. DOM is known to be slow, so some frameworks like Angular have implemented data-binding, which allows you to update content without going through it.
The author clarifies that in fact JavaScript can be faster than other languages ​ ​ like Objective-C (used on iOS) when exchanging messages, as this is what works better with JIT than with static compilation.
In the end, the author explains the speed of native iOS applications by the fact that the screen has a unique size, unlike Android or other systems.

Documents

While the language is relatively easy to learn, it has dark points, to the point where we have books specialising in the right parts of the language and others specialising in the hard aspects.

Compiling in JavaScript
Toolbox

You can develop an application in JavaScript under LightTable (see frame above), Eclipse, NetBeans or Aptana, or a text editor for a simple script.

JavaScript at the command prompt
Extensions and frameworks

To develop a serious application, it is recommended to use the Ajax or HTML 5 framework. There are also frameworks for mobile devices.

Programming and dated languages - Asm.js- - BASIC- C- -C++ # C- - Darth-Eiffel - Guo- --JavaJavaScript--Julia PascalPHP- - - Python- - Prolog RubyLa ScalaScriptolSwift TypeScriptHTMLVasmXMLXAML SQL
News

JavaScript becomes Linux application language

05-02-2013 19:06:01

Linux

In particular, applications for the Gnome environment, which thus follows the path of Windows 8 and its modern interface. Other languages ​ ​ remain possible, but JavaScript is the first choice. There are many advantages: greater portability, a larger ecosystem, a wider audience of developers, because JavaScript is known to almost everyone.
Obviously, this causes protests, because each developer has his own favorite language (C, Python, Ruby, etc.), which he would like to see for this role.
Another reference environment, KDE, being based on Qt, also uses JavaScript for the interface and C++ for applications. However, the Plasma interface, which is analogous to Metro for Linux, allows you to quickly create applications in JavaScript using the Plasmate IDE.