Hello everyone !
In this post I am going to give you an whole idea about to getting started with nodeJS.
What is Node.js?
Node.js is an open source, cross platform, back end javascript runtime environment that runs on the V8 engine and executes javascript code ooutside a web browser. Node.js lets developers use javascript to write command line tools and for server-side scripting to produce dynamic web page content before the page is sent to the user's web browser.
Though .js is the standard file name extension for javascript code, the name "NodeJS" does not refer to a particular file in this context and is merely the name of the product. Node.js has an event-driven architecture capable of asynchronous I/O. The design choices aim to optimize throughput and scalability in web applications with many I/O operations, as well as for real-time web applications.
NodeJS was written initially by Ryan Dahl in 2009, about 13 years after the introduction of the first server-side javascript environment.
What is an event-driven architecture?
Node.js brings event-driven programming to web servers, enabling development of fast web servers in JavaScript. Developers can create scalable servers without using threading, by using a simplified model of event-driven programming that uses callbacks to signal the completion of a task. Node.js connects the ease of a scripting language (JavaScript) with the power of Unix network programming.
Node.js was built on top of Google's V8 JavaScript engine since it was open-sourced under the BSD license. It is proficient with internet fundamentals such as HTTP,DNS and TCP. JavaScript was also a well-known language, making Node.js accessible to the web development community.
What is V8 engine?
V8 is the JavaScript execution engine which was initially built for Google Chrome. It was then open-sourced by Google in 2008. Written in C++, V8 compiles JavaScript source code to native machine code at runtime.
What is event loop?
Node.js registers with the operating system so the OS notifies it of connections and issues a callback. Within the Node.js runtime, each connection is a small heap allocation. Traditionally, relatively heavyweight OS processes or threads handled each connection. Node.js uses an event loop for scalability, instead of processes or threads.In contrast to other event-driven servers, Node.js's event loop does not need to be called explicitly. Instead, callbacks are defined, and the server automatically enters the event loop at the end of the callback definition. Node.js exits the event loop when there are no further callbacks to be performed.How to install nodeJS to windows to getting started?
- Firstly you have to go to https://nodejs.org website and download nodejs packages to your PC according to your operating system.
- I can recommend the stable version not the latest version.
- Then go to the download location and open nodejs.exe file and install. This process will take several minutes.
- Then you can run your windows command prompt and type as "node" and then enter.If you can not see the version of your installed nodejs packages, re install and try to run the command.
- If the nodejs installation is success now you can star developing with nodejs and other preferring technologies.



Comments
Post a Comment