Search This Blog

What is Node.js? Tutorials For Beginners - Part 1

I have been searching for this answer. Being a .NET developer, I was curious to know what exactly is Node.JS or Node. If we go by the definition on its official website, it says -

Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.

This definition is not very clear from beginners standpoint. Lets try to understand what's inside Node.JS -

1. Most of the browsers have some JavaScript Engine working behind the scenes. This engine is the main component of the browser that converts your JavaScript code into machine code. What it actually does is - it takes your JavaScript code, reads it, parses it and then compiles it into machine code.

2. Chrome has V8 JavaScript Engine, Mozilla has Spider Monkey, Edge has Chakra and Safari has JavaScript Core JavaScript Engine. Every JavaScript engine has its own implementation that is why we face some JavaScript compatibility issues across the browsers.

3. In simple words, we can say that browser is a program which uses JavaScript engine and provides a way to run JavaScript code. i.e. it provides the environment by which you can run JavaScript code. Running JavaScript is not the only task that browser performs. They have additional tasks and features as well. Now let's talk about JavaScript specification.

4. Each language has some specification i.e. rules and guidelines that it follows. ECMAScript is the specification for scripting languages and JavaScript follows this specification. It has various versions like ECMAScript 2015, ECMAScript 2016 and so on. JavaScript is one of the implementation of these specifications. Browsers are implementing the features specified in these specifications so that we can use latest features in our JavaScript code.

5. But what exactly does this specification covers? It just talks about the language features. You can refer the specification here. Few important questions before we move ahead -

Does it contain how setTimeout should work?

Does it contain how DOM manipulation should work?

Does it contain how to fetch data from server?

ANSWER IS NO 😮

Then who is providing the specification for these? Specification for these features is provided by W3C and WHATWG. These features are not part of JavaScript specification.

6. These are the APIs provided by browsers which are "accessed using JavaScript". Here comes another JavaScript incompatibility issue we face. Each browser has its own implementation for this as well. Let me give you one example of incompatibility in DOM Manipulation API -

remove() is not supported in IE, it has removeNode() method to remove node from the DOM

But wait!! Are we not supposed to talk about NODE.JS 😳 ?

Yes, we are here to understand what is NODE.JS or NODE. But we need to have a clear idea about What is JavaScript ? What are Browser APIs? This will make our understanding clear about Node JS.

Let's summarize all of this -

JavaScript is a scripting language that follows ECMAScript specification. ECMAScript only specifies language features not the browser APIs. Browser APIs are implemented by the browsers which are accessed via JavaScript. Browser APIs extends the JavaScript syntax to do certain things in the browsers. Browsers provide the environment where you can run your JavaScript and do tasks like - manipulating DOM, fetching data from server, play videos and audio etc.

Great Article. Thank you for sharing! Really an awesome post for every one.

IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms. Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

Post a Comment

Popular posts from this blog

Great android apps require great design. For great design you need to master layouts. Layout is one of the basic building block of Android User Interface. Lets jump right in and try designing layout for our app - Just Maths.

Just Maths has 3 screens - Main Menu Screen, Game Screen and Score Screen. Each of the screen is designed using Relative Layout and Linear Layout. There are other layouts as well like Frame Layout, Table Layout and Grid Layout. But you can design anything using only Relative Layout and Linear Layout. These layouts are nothing but View Groups.

Want to build Android Apps really fast?
With Android Studio and a blend of Java and XML, you will be up and running and coding Great Android Apps in no time.
Let's get started. We will be creating a very simple app named Just Maths that will ask user a Maths question. User either presses (✔) or (X) to answer the question. This is going to be a project based learning wherein you will have something concrete in the end.

Here's is a quick way of implementing Auto-Complete in your webpage. Auto-Complete dropdowns are some textbox type looking elements on webpage. When you type on these textboxes you will be prompted with value options just like in dropdowns. The good part of using this method is you need not to using any jQuery for this. The bad part is this will only work in modern browsers which support HTML5.