Dive Deeper into Nodejs - JavaScript & ECMAScript

Karim Muhammad
Nov 13
3 min read
post_comment1 Comments
post_like1 Likes


JavaScript is a scripting language was designed by Brendan Eich, and it is one of the core technologies WWW (Word Wide Web) which was shined thanks to Tim Berners-Lee and his teams CERN which made a backbone for WWW.

Brendan Eich created JavaScript Language in few days - 10 days!

#ECMA International

Non-profit standards organization which put rules and standards for programming languages, the organization was founded in 1961 to standardize computer systems in Europe in general.

of course 10 days was not enough to build a strong language...

Netscape - in which Brendan Eich work - submitted JavaScript into ecma international, as starting point for a standard specification that all browser vendors could conform to, and first edition released in june called ECMAScript!

this helped browser to run javascript fine in its own engine; because It's standardized!

note ecma international it put standards for many things not only Javascript e.g XML, JSON, Embeded systems, etc...


#What Is ECMAScript?

It is set of rules which organization defines.

Set of rules like what??!

  • Functions
  • Constants
  • Data Structure
  • Algorithms
  • etc..

JavaScript is a high-level, often just-in-time compiled language that conforms to the ECMAScript standard, It has dynamic typing, prototype-based object-orientation, and first-class functions. It is multi-paradigm, supporting event-driven, functional, and imperative programming styles. It has application programming interfaces (APIs) for working with text, dates, regular expressions, standard data structures, and the Document Object Model (DOM).

this organization(ecma international) just define features for making all browsers to implement it in thier own JavaScript Engine, to work Javascript fine.

and each engine completely free how to implement it, but is should works at the end as expected.

Let's give an Example.

ecma international announced new rule called BlobArray (i'm just give an example) so now all browsers must implement this data structure in thier own engine.. for example engine of Mozilla is called "SpiderMonkey" and engine of Google is called "V8".

so that javascript can works in all browsers fine, but may some features works in some browser(engine) and some not (havn't implemented yet for example in this engine) like in case Google's engine and Internet Explorer's engine.

and you may notice some performance when run JS in different engines as well!

ECMAScript ecmascript feature

see! it define feature and what should return.

but for implementing it, it just display pesudo-code, not real implementation.

#Why all of that?

next article - Insha allah - will be about "New/Custom Features Javascript".

as we learned, Javascript's Features is defined by the oragnization, and should developers V8 Implement these features to make V8 compile these features.

and as we learned from previous article is ... V8 Engine is Open Source, so can anyone use it and add more features on it!

and that's what creator of nodejs did! he did take V8 and embeded it in his software program and added more features (C/C++ code,JS code), and boom! NodeJS.

added features like reading file, http, communication protocols, and others...

so that next article we will learn how to add your own features in javascript language and compiled fine by V8!

nodejs and v8 together


#nodejs #javascript #part2

You are not logged in.