Which JavaScript is It?

A recent survey indicated that Node.js is downloaded more often than Angular.js, and Angular is downloaded more often than React.js. Knowing a little about each one increases understanding of the worldwide JavaScript ecosystem.

JavaScript

JavaScript is a programming, or scripting, language that focuses on formatting interactive client-side Web pages. It is mostly abbreviated as JS. This high-level programming language uses the concept of Object-oriented-programming (OOP), but it is based on prototype inheritance.

Node.js

Node.js is not a programming language. Node.js is a cross-platform, open-source JavaScript environment that asynchronously runs JavaScript on the server-side. This fast, lightweight runtime allows JavaScript code to run outside the browser. It can generate dynamic page content and collect form data, in addition to manipulating server files. It can also add, delete, and modify database data. The Node.js package ecosystem is the largest set of open source libraries in the world.

Libraries contain modules, which are blocks of code that are related by their functionality. They communicate with applications in the same manner as any other object-oriented code. Applications can be a single file or a collection of files and folders. Node.js includes three types of modules:  core, local, and third-party.

Angular.js

AngularJS is a JavaScript framework. It can be added to an HTML page with a <script> tag. Angular has no keywords of its own, because it is entirely based on HTML and JavaScript. Instead, it has directives that extend HTML by binding to data with expressions that are enclosed in double curly brackets. Angular supports separation of concerns by using the Model-View-Controller (MVC) design pattern.

In other words, the controller operates on the model to create and/or display the view, although Angular only has the controller and the model.

For example, the body of the following HTML page is an Angular application. It uses a model, but is not complex enough to require a controller.

<<!DOCTYPE html>
<html >
<head>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.16/angular.min.js"></script>
</head>
<body ng-app>
    <input type="text" ng-model="name" />
    <div>
       Hello {{name}}
    </div>
</body>
</html>

React.js

React is a frontend framework that creates and manipulates a virtual DOM in memory, previous to making the changes in the browser DOM. The two primary pieces that are imported to use it are the following.

React code can be initially authored directly in HTML, but a React environment must be created for production environments. This environment is primarily npm and Node.js, and the command line will generate an empty application in the specified directory. When you use the command npm start, an example React app will display in the browser. Then, you can modify files in the app directory to build the Web page.

React.js uses components, functions, and hooks.

The following is sample code that uses the ReactDOM component to display information that is generated in a function in a React app.

function WhatGoesWhere() {
  return <p>This is Tab A.</p>;
}
<div id="slotB"></div>
ReactDOM.render(<WhatGoesWhere />, document.querySelector("#slotB"));

Summary

A familiarity with JavaScript makes it easy to learn the other environments and frameworks. Object-oriented development techniques help Web developers learn and use Node.js. A little more study will allow you to master Angular.js. React has a different  orientation because of its reliance on the Document Object Model, but it still allows you to make robust Web sites. In a short time, you will be able to author JavaScript functions in any of these frameworks, and use the Angular directives as if they were JavaScript functions from any library.

References

https://angular.io/guide/built-in-directives
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference 
https://flaviocopes.com/javascript-reserved-words/
https://react.dev/reference/react 
react-vs-vanilla-javascript
https://www.geeksforgeeks.org/difference-between-node-js-and-javascript/
https://www.geeksforgeeks.org/node-js-modules/
https://www.konstantinfo.com/blog/angularjs-vs-nodejs-vs-reactjs/
https://www.quora.com/What-specifically-are-the-model-view-and-controller-in-Angular-5
https://www.tutorialsteacher.com/angular
https://www.tutorialsteacher.com/nodejs/nodejs-modules
https://www.w3schools.com/angular/angular_directives.asp
https://www.w3schools.com/jsref/ 

JavaScript Comparison
File Size: 2015 kb
File Type: ppsx
Download File

Some presentations include images that were included with purchased software.