Code Pumpkin

ECMAScript, JavaScript Engines, ECMA-262 etc.

August 20, 2018
Posted by Suyash Purwar

In this article, I will focus on a mixture of topics. Mainly, i am focusing on ECMAScript becuase most people don't understand what actually it is. I am focusing on another topics too like JavaScript engines, ECMAScript, ECMA specifications etc. Don't worry at all if these are alien words to you, I'll be explaining each and everything very briefly. Without further ado, let's begin.

Note: This article has a couple of words that may sound unfamiliar to you as you are a beginner. Don't panic! I have underlined all the difficult words that might sound alien to you, you will find the simplest definitions of these terms just by hovering mouse pointer over them. Also I have included same definitions of these terms in the Glossary section at the end of this article .

What is JavaScript?

JavaScript (often abbreviated as JS) is a language for client-side as well as server-side scripting (through Node.js). JavaScript is object-oriented, prototype-based, multi-paradigm scripting language. JavaScript is used to make a web page interactive, it can also be  used in servers for handling requests recieved from browsers. JavaScript is the fastest dynamic language, its performance is amazing. JavaScript is an interpreted language which uses JIT (Just-in-time) compilation process for fast execution.

What is eCMAScript?

You might have heard of this word, you might have googled it too but as per my experience with JS, you might have failed to understand this term or didn't understood what exactly this is. I will try my best to keep things simple to make you understand clearly.

ECMA International is an organization that creates standards for technologies. I know, you might be thinking what's the meaning of "standards" here. Standards are the guidelines for products or processes. ECMA stands for European Computer Manufacturers Association, it's just an organization which releases standards for product.

Javascript (JS) and ECMAScript (ES)

ECMA-262? what is this now ??

ECMA-262 is standard published by ECMA International. ECMA-262 provides the specification for general purpose scripting language.

ECMAScript

ECMAScript is a specification which is defined in ECMA-262 for creating general purpose scripting language. Every general purpose language must follow rules and regulations so as to meet in accordance with rules and regulations which are defined by ECMAScript.

ecma standards

JavaScript

JavaScript engine is an implementation of ECMAScript, JS follows all rules that are specified in ECMAScript. JavaScript is an example of general purpose scripting language. It confronts rules and regulations that are specified in ECMAScript. 

It would not be right to say that, JavaScript only follows the rules that are specified in ECMAScript. JavaScript also follows some rules that are not specified by the ECMAScript.

JavaScript's Compatibility

JavaScript is a program which executes the JavaScript code. There are a lot of JavaScript engines. All the main web browsers support JavaScript, thus all of them have their own implementation of JavaScript engine.

If we talk about support of JavaScript, then we will find that the recent changes in JavaScript are not supported in browsers. The latest version of ECMAScript is ECMAScript 6 (often abbreviated as ES6) introduced some new rules and functionalities which are not supported in all browsers. In order to use the latest features of ES6 without decreasing the compatibility, we have got many transpilers like Babel, TypeScript etc.

JavaScript Engines

As we know, that all mainstream browsers suport JavaScript. So that means, all the browsers who support JavaScript have it's own embedded JavaScript engine. Work of JavaScript engine is to execute the code. There are lot of JavaScript engines out there, which are used to interpret JavaScript.

JavaScript utilizes  Just-In-Time (JIT) Compilation for converting the JavaScript code into bytecode. Bytocode is the file that gets executed, source code is never executed directly. Firstly, source code gets compiled into bytecode, then bytecodes executes. Actually, JIT is basically a combo of compiler and interpreter. Most of the developers say that JavaScript is interpreted language but actually it's not. JavaScript uses JIT Compilation technique for faster execution. We will discuss more about the JIT compilation in next articles.

Some of the well-known JavaScript engines are as follows:

  • V8 – Developed by Google in Denmark. V8 is the engine which is used in Google Chrome and Node.js.
  • Rhino – Developed by Mozilla Foundation, written completely in Java.
  • SpiderMonkey – This is first JavaScript engine which was developed by Netscape Navigator. Nowadays, this engine powers Firefox.
  • Chakra – This is the JavaScript engine for Microsoft Edge.

Glossary

  • Client-side Scripting: Scripts that are being executed on a web browser are know as Client-side scripting. Client-side scripts are executed by a browser's engine.
  • Server-side Scripting: This is a technique in which scripts are executed on a web server instead of web browser.
  • Object-oriented: This is a programming paradigm or we can say, it's just a style of coding. Object-oriented programming is abbreviated as OOP.
  • Prototype-based programming: JavaScript is a prototype-based language. Prototype-based is style of object-oriented programming. In this style of programming, it is possible to create object without first defining it's class.
  • Multi-paradigm: JavaScript is called multi-paradigm language because it is designed in a way in which it is possible to code in different styles.
  • Dynamic Language: Dynamic Programming language is a class of High Level Language which, executes task, during execution time rather than compilation time (like most of the languages).
  • JIT (Just-In-Time) Compilation: It is a way of executing computer code that involves compilation during execution of a program – at run time – rather than prior to execution.

Note:  If you are a newbie in programming, unfortunately you wouldn't be able to understand some of these definitions. But don't worry, as soon as your basics will be completed, you will surely be introduced to these concepts.

That's all for this topic. If you guys have any suggestions or queries, feel free to drop a comment. We would be happy to add that in our post. You can also contribute your articles by creating contributor account here.

Happy Learning 🙂

If you like the content on CodePumpkin and if you wish to do something for the community and the planet Earth, you can donate to our campaign for planting more trees at CodePumpkin Cauvery Calling Campaign.

We may not get time to plant a tree, but we can definitely donate ₹42 per Tree.



About the Author


A tech guy who loves to code and design edge-cutting websites and mobile apps. I'm open source enthusiast and a delicious coffee maker



Tags: , , , ,


Comments and Queries

If you want someone to read your code, please put the code inside <pre><code> and </code></pre> tags. For example:
<pre><code class="java"> 
String foo = "bar";
</code></pre>
For more information on supported HTML tags in disqus comment, click here.
Total Posts : 124
follow us in feedly

Like Us On Facebook