JS & Node.js An Intro to fastest growing technology based on JS
JSA language which is common for all programmers.
JS Evolution Phase 0: Birth Created in 10 days in May 1995 by Brendan Eich, In 1996 - 1997 JavaScript was taken to ECMA to carve out a standard specification. Phase 1: Browsers war 1 (1996 - 2001) During this period, the standards process continued in cycles, with releases of ECMAScript 2 in 1998 and ECMAScript 3 in 1999, which is the baseline for modern day JavaScript. Microsoft won the war with IE6( own version of JS). Phase 2: The Years of Struggle ECMAScript3.1 & 4 took almost 8 years of development and ES4 was finally scrapped. Following were the features of ES4, which was implemented into ActionScript by Adobe. Classes, Interfaces, Namespaces, Packages, Optional type annotations, Optional static type checking, Structural types, Type definitions, Multimethods, Parameterized types, Proper tail calls, Iterators, Generators, Instrospection, Type discriminating exception handlers, Constant bindings, Proper block scoping, Destructuring, Succint function expressions, Array comprehensions
Rebirth Of JS After the long struggle of ECMAScript 4, from 2008 onwards, the community focused on ECMAScript 3.1. In the year 2009 ECMAScript 3.1 was completed and signed-off by all involved parties. ECMAScript 4 was already recognized as a specific variant of ECMAScript even without any proper release, so the committee decided to rename ECMAScript 3.1 to ECMAScript 5 to avoid confusion. ECMAScript 5 was a rather modest update to ECMAScript 3, it included: • Getter/setters • Trailing commas in array and object literals • Reserved words as property names • New Object methods (create, defineProperty, keys, seal, freeze, getOwnPropertyNames, etc.) • New Array methods (isArray, indexOf, every, some, map, filter, reduce, etc.) • String.prototype.trim and property access • New Date methods (toISOString, now, toJSON) • Function bind • JSON • Immutable global objects (undefined, NaN, Infinity) • Strict mode • Other minor changes (parseInt ignores leading zeroes, thown functions have proper this values, etc.)
JavaScript engines • Rhino - managed by the Mozilla Foundation, open source, developed entirely in Java • SpiderMonkey - the first JavaScript engine, which powered Netscape Navigator and today powers Firefox • V8 - open source, developed by Google in Denmark, part of Google Chrome • JavaScriptCore - open source, marketed as Nitro and developed by Apple for Safari • KJS - KDE's ECMAScript/JavaScript engine originally for Konqueror web browser • Chakra (JScript9)- for Internet Explorer • Chakra (JavaScript) - for Microsoft Edge • Nashorn - open source as part of OpenJDK, written by Oracle Java Languages • Juce - a C++ application framework, contains a custom embedded interpreter using part of JavaScript's syntax. • JerryScript, is an ultra-lightweight JavaScript engine for the Internet of Things.
JS with Browsers Document Object Model(DOM): Initially Javascript was only responsible to manipulate the area which could be scriptable at page specifically Forms, Links and Images. Later, all elements became scriptable and hence there were a standard defined by W3C(World wide Web Consortium) Browser Object Model(BOM): A set of Objects for browsers environment which was standardised with HTML5
Node.js A platform to run JS code. By RYAN DAHL@2009
Pre-requsite For Node.js HTML JS TCP/IP HTTP/S
Node.Js The official website (http://www.nodejs.org) defines Node as “a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and effi- cient, perfect for data-intensive real-time applications that run across distributed devices.”
• V8 gives Node a huge boost in performance because it cuts out the middle- man, preferring straight compilation into native machine code over executing byte-code or using an interpreter. • One Language for all (Client & server) • JSON is native to JS • JS is the core language for No-Sql db • JS is the compiler target • Asyncronous and vented • Dirty Applications: A good example of a DIRTy application written with Node is Browserling (brow- serling.com, shown in figure 1.3). The site allows in-browser use of other browsers. Key Features @Node.js
Managers for Node NVM (Node Version Manager): Used to install and mange various version of Node at system. NPM(Node Package Manger): Node.js gives the core programming tool with an event loop and a low level I/O API. Hence NPM is there to install and manage third party libraries/ packages available for node.js. There are several other package managers of node i.e Yarn, pnpm etc..

An Intro to Js & Node.js

  • 1.
    JS & Node.js AnIntro to fastest growing technology based on JS
  • 2.
    JSA language whichis common for all programmers.
  • 3.
    JS Evolution Phase 0:Birth Created in 10 days in May 1995 by Brendan Eich, In 1996 - 1997 JavaScript was taken to ECMA to carve out a standard specification. Phase 1: Browsers war 1 (1996 - 2001) During this period, the standards process continued in cycles, with releases of ECMAScript 2 in 1998 and ECMAScript 3 in 1999, which is the baseline for modern day JavaScript. Microsoft won the war with IE6( own version of JS). Phase 2: The Years of Struggle ECMAScript3.1 & 4 took almost 8 years of development and ES4 was finally scrapped. Following were the features of ES4, which was implemented into ActionScript by Adobe. Classes, Interfaces, Namespaces, Packages, Optional type annotations, Optional static type checking, Structural types, Type definitions, Multimethods, Parameterized types, Proper tail calls, Iterators, Generators, Instrospection, Type discriminating exception handlers, Constant bindings, Proper block scoping, Destructuring, Succint function expressions, Array comprehensions
  • 4.
    Rebirth Of JS Afterthe long struggle of ECMAScript 4, from 2008 onwards, the community focused on ECMAScript 3.1. In the year 2009 ECMAScript 3.1 was completed and signed-off by all involved parties. ECMAScript 4 was already recognized as a specific variant of ECMAScript even without any proper release, so the committee decided to rename ECMAScript 3.1 to ECMAScript 5 to avoid confusion. ECMAScript 5 was a rather modest update to ECMAScript 3, it included: • Getter/setters • Trailing commas in array and object literals • Reserved words as property names • New Object methods (create, defineProperty, keys, seal, freeze, getOwnPropertyNames, etc.) • New Array methods (isArray, indexOf, every, some, map, filter, reduce, etc.) • String.prototype.trim and property access • New Date methods (toISOString, now, toJSON) • Function bind • JSON • Immutable global objects (undefined, NaN, Infinity) • Strict mode • Other minor changes (parseInt ignores leading zeroes, thown functions have proper this values, etc.)
  • 5.
    JavaScript engines • Rhino- managed by the Mozilla Foundation, open source, developed entirely in Java • SpiderMonkey - the first JavaScript engine, which powered Netscape Navigator and today powers Firefox • V8 - open source, developed by Google in Denmark, part of Google Chrome • JavaScriptCore - open source, marketed as Nitro and developed by Apple for Safari • KJS - KDE's ECMAScript/JavaScript engine originally for Konqueror web browser • Chakra (JScript9)- for Internet Explorer • Chakra (JavaScript) - for Microsoft Edge • Nashorn - open source as part of OpenJDK, written by Oracle Java Languages • Juce - a C++ application framework, contains a custom embedded interpreter using part of JavaScript's syntax. • JerryScript, is an ultra-lightweight JavaScript engine for the Internet of Things.
  • 6.
    JS with Browsers DocumentObject Model(DOM): Initially Javascript was only responsible to manipulate the area which could be scriptable at page specifically Forms, Links and Images. Later, all elements became scriptable and hence there were a standard defined by W3C(World wide Web Consortium) Browser Object Model(BOM): A set of Objects for browsers environment which was standardised with HTML5
  • 7.
    Node.js A platform torun JS code. By RYAN DAHL@2009
  • 8.
  • 9.
    Node.Js The official website(http://www.nodejs.org) defines Node as “a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and effi- cient, perfect for data-intensive real-time applications that run across distributed devices.”
  • 10.
    • V8 givesNode a huge boost in performance because it cuts out the middle- man, preferring straight compilation into native machine code over executing byte-code or using an interpreter. • One Language for all (Client & server) • JSON is native to JS • JS is the core language for No-Sql db • JS is the compiler target • Asyncronous and vented • Dirty Applications: A good example of a DIRTy application written with Node is Browserling (brow- serling.com, shown in figure 1.3). The site allows in-browser use of other browsers. Key Features @Node.js
  • 11.
    Managers for Node NVM(Node Version Manager): Used to install and mange various version of Node at system. NPM(Node Package Manger): Node.js gives the core programming tool with an event loop and a low level I/O API. Hence NPM is there to install and manage third party libraries/ packages available for node.js. There are several other package managers of node i.e Yarn, pnpm etc..