ECMAScript is not JavaScript - A Brief Introduction to ECMAScript

Tags: javascript, ecmascript, node
Published: 2020-06-19 17:23:27

# What is the EcmaScript?
EcmaScript is the programming language specified in the ECMA-262 document, and is common address to the “EcmaScript” by the word “JavaScript”.

You can use the word “JavaScript” as a synonym to “EcmaScript”.

# The Programming Language and the Specification
A common mistake is apply the word “EcmaScript” to address the document “ECMA-262”. This document is the specification of the EcmaScript, and EcmaScript is a programming language.

EcmaScript is not a specification of the JavaScript, is a programming language.

# Where We Can Use the EcmaScript?
The ES (EcmaScript) can be used to code applications for different platforms using different programming techniques (paradigms). You can use ES to create applications for: web (client and server-side), smartphones, and computers.

# Main Concepts for Developers
If you are a beginner in EcmaScript is important to understand some concepts before study the language in practice. But don’t worry if you don’t understand perfectly from the first time reading about it.

## Concept 1) Host Environment

The Host Environment is where the EcmaScript source code is being interpreted, for example: a browser, a server, a smartphone operating system.

## Concept 2) Host Facilities

Host Facilities are the features offered by the Host Environment, for example, in browsers you can use Web APIs as DOM, CSSOM, Fetch, and others.

## Concept 3) Core Language

Core Language is an concept to address the set of features offered by the EcmaScript itself independent of the Host Environment.

## Concept 4) Prototype-based

In a Class-Based programming language you use a static template from where you create your objects: the class. In a Prototype-Based programming language, as EcmaScript, you use a dynamic template from where you create your objects: the prototype.

While using an dynamic template for create the objects you can change this template in runtime. While using an static template you cannot do it.

## Concept 5) Object-Based

In EcmaScript all within in an object, for example, the global variables are properties of the object referenced by the identifier globalThis.

## Concept 6) Multi-paradigm

EcmaScript supports different programming paradigms (programming techniques), and you can combine different paradigms in the same application.

## Concept 7) Hoisting

EcmaScript allows declared variables (using var) and declared functions to be accessed anytime.

## Concept 8) Garbage Collected

EcmaScript automatically allocates and releases the memory according is needed by your source code.

The memory is allocated when you create an object. And is released when the object is not being used.

## Concept 9) General Purpose

Using EcmaScript you can make applications for different platforms, not only to the web and not only to the client-side. For example: using NodeJS you can write code to the server-side, and using React Native you can write code to Smartphones.

# How to learn more about EcmaScript?
Currently the best guide for developers is the JavaScript Guide, by MDN. But you can also read the EcmaScript specification, the document ECMA-262 (not recommended to beginners).

## Original Text in my blog:
https://universeofprogramming.wordpress.com/2020/06/17/an-brief-introduction-to-ecmascript/

Report