Created in 1995 by Brendan Eich, the JavaScript was a simple scripting language. Today JavaScript is one of the heavyweights of Web development, here is his ID card.
The JavaScript (often abbreviated JS) is the first scripting language for the Web. It was launched by a well-known browser at the beginning of the Internet called Netscape. JavaScript is included in the HTML file with its own tags that will be declined later in the article:)
The latter adds interesting features that the HTML does not have. These additional features allow in particular to make the Web more interactive, the JavaScript ran only client side (Web browser on the side of the visitor).
However, JS can now rely on node. js, which provides a server-side environment for using JavaScript to generate Web pages, that’s another story;)
Behind this name is a set of technologies designed to make fast updates of the content of a webpage, without requiring any reloading visible to the user of the webpage. The technologies used are diverse and depend on the type of queries that we want to use, but in general the JavaScript is constantly present.
To complete the presentation, the JS association with AJAX technology (acronym for asynchronous JavaScript and XML) allows for fast updates of the content of a webpage in the absence of reloading by the user. This is a technology used by Facebook for loading posts. In General, when AJAX technology is used, JS is never far away.
Attention: JavaScript has often been confused with Java, another language that needs to be compiled.
His little story
At the beginning, the latter was called live script and it was a simple language for the browser Netscape Navigator 2. At the time of his creation, he was the subject of many criticisms. It has long been considered as can secure and with too few explicit error messages.
The live script was then renamed JavaScript by Netspace on the occasion of its partnership with Sun Microsystems. In addition, to avoid any drift that could compromise the project, the ECMA standard came to complete its standardization in 1997 (Standard ECMA-262).
For a long time, JavaScript was not standardized by Web browsers. That is to say that a code could or might not work according to the browser. Fortunately nowadays, this is no longer the case:)
Java vs JavaScript
Here we talk about JavaScript, we breathe it, we eat it even so let’s not talk about Java at all. JavaScript is implemented directly in HTML unlike the Java that needs to be compiled. In addition, Java must be loaded into memory (client) at each page load, which explains the slowdown of Java applets.
Remember that JS is a very untyped language but the latter is case sensitive. In other words, it is case sensitive. Concretely, “Bonjour ();” and “Bonjour ();” do not have the same value. In addition, the code can end with a semicolon. Let me explain: If you omit a semicolon, the JavaScript will consider that this is the end of this piece of code;)
Jquery
JQuery is a JS library that will simplify your life, this library was created by John Resig in 2006. The JavaScript took a long time to be “normalized” on all browsers and it was true a headache! Fortunately, jQuery arrived and it broke everything in its path! The latter acts as a superlayer and ensures backward compatibility with all older browsers. No more testing for his code, jQuery is here to do the job!
Plus its simplified syntax allows you to implement your jQuery Plugins just with one line. It’s insane! With time, jQuery tends to lose its interest since the JavaScript takes its revenge and catches up to the delay thanks to its version vanilla (original).
AngularJs
AngularJs was born in the premises of Google in 2009 following a project of 17 000 lines of orders named Google feedback. Brad Green and Shyam Seshadri, seeing the Titanic code, proposed to rethink their code with a home framework. The framework had only 1 500 lines of code. This is how a story was born, that of AngularJs.
The latter, using guidelines allows you to create your own Web app. Its strength lies in the HTML. And yes it’s amazing on the part of a JS framework but the latter is based on HTML to make scopes
To conclude
JavaScript is now almost everywhere! From Facebook to suggestion during a typing through a Tetris in 3D, JavaScript is indispensable to make a Web page dynamic and interactive. The js has beautiful days in front of him!
Sources: Alsacreation, Openclassroom, AngularJs, jQuery, MDN, W3school, Grafikart