Wednesday, September 7, 2016

What you can not do with javascript that you can do with NodeJs

What you can not do with javascript that you can do with NodeJs

Here we are going to discuss about what javascript can not do which nodejs can do.

visionfortech,pratik soni blog,javascript,nodejs,pratik soni nodejs blog,latest technical blog


All browsers have JavaScript engines that run the JavaScript of web pages. Firefox has an engine called Spidermonkey, Safari has JavaScriptCore, and Chrome has an engine called V8.

Node.js is simply the V8 engine bundled with some libraries to do I/O and networking, so that you can use JavaScript outside of the browser, to create shell scripts, backend services or run on hardware

JavaScript is an implementation of ECMAScript, a standard defining the programming language.

Browsers have a built-in interpreter for JavaScript, along with a bunch of libraries and a run-time environment for working with web pages.

Nodejs is an interpreter and environment for javascript which includes a bunch of libraries for using javascript as a general-purpose programming language, with an emphasis on asynchronicity and non-blocking operations. Node actually runs the same interpreter as Google Chrome (V8), but provides a different set of libraries and a different run-time environment. It also includes a package management system (NPM) and a few language extensions you won't find standard in browsers (for example modules).

The JS interpreter in Google Chrome and the JS interpreter in Nodejs are essentially the same. The difference is, in a browser your end goal is to modify stuff in a web page (text, graphics, stylesheets, etc), in Nodejs it's to run general purpose code that might do anything from running a web server to manipulating files.

JavaScript is a language that runs inside web browsers as part of documents loaded by the browser. It gives behaviour to your pages (HTML gives semantic structure, CSS gives form or look and feel). However nothing ought to restrict JavaScript to run solely inside the browser. Now being an interpreted language, it needs an interpreter to run. V8 is the Google Chrome JS engine and 'node' is a front-end to it that can be used to run JavaScript scripts outside the browser. Node.js or just Node usually refers to a collection of objects and methods available to your JavaScript code when run in V8 or through the node interpreter. It is a JavaScript libray cum runtime.

Javascript is normally used in client side scripting to validate forms, send ajax requests and manipulate html pages. Nodejs allows you to run javascript on server, which makes sense as you are already using it in front end and same code can be reused at server side for any reusable functionality. Also it reduces the need to have two different languages in client and server side of any web application.

Node.js let’s you run JavaScript from your computer’s terminal/command prompt. It allows you to install and use modules, other JavaScript programs, to do things with JavaScript that we wouldn’t be able to do. Some examples are:


  1. Manipulate files using the file system module
  2. Transpile TypeScript or CoffeeScript into JavaScript
  3. Write desktop applications using Github’s Electron framework
  4. Write web applications (from the backend to UI) entirely in JavaScript


There are a lot of other uses. Node.js takes JavaScript from a language that only browsers can use to a programming language for building apps or just running programs from your computer’s terminal/command prompt.

If you know Java then Java is to JRE is to JVM what JavaScript is to Node is to V8.

Feel free to comment below your experience with above approach and If you still find any problem  with above steps Let me know I would love to help you to resolve your  problem.

 If you want to take your Technological Knowledge to the Next Level and For More Technological information Stay tuned to  Visionfortech

No comments:

Post a Comment

Protected by Copyscape