Node JS:
Node JS is an extremely powerful framework developed on Chrome’s V8 JavaScript engine that compiles the JavaScript directly into the native machine code. It is a lightweight framework used for creating server-side web applications and extends JavaScript API to offer usual server-side functionalities. It is generally used for large-scale application development, especially for video streaming sites, single-page applications, and other web applications.
What are the Difference between Nodejs and JavaScript ?
NodeJS:
- Type: Interpreter and environment for JS.
- Utility: Used for accessing or performing any non-blocking operation of any operating system.
- Running Engine: V8(Google Chrome).
JavaScript:
- Type: Programming Language.
- Utility: Used for a client-side activity for web application.
- Running Engine: Firefox, Safari, V8(Google Chrome), etc.
Why Node.js is single-threaded ?
Node.js uses a single-threaded model in order to support async processing. With async processing, an application can perform better and is more scalable under web loads. Thus, Node.js makes use of a single-threaded model approach rather than typical thread-based implementation.
Where Node.js can be used ?
Node.js can be used to develop:
- Real-Time Web Applications
- Network Applications
- Distributed Systems
- General Purpose Applications
Benefits of using Node.js !
- Fast: Node.js is built on Google Chrome’s V8 JavaScript Engine which makes its library very fast in code execution.
- Asynchronous: Node.js based server never waits for an API to return data thus making it asynchronous.
- Scalable: It is highly scalable because of its event mechanism which helps the server to respond in a non-blocking way.
- Open Source: Node.js has an extensive open source community which has contributed to producing some excellent modules to add additional capabilities to Node.js applications.
- No Buffering: Node.js applications simply output the data in chunks and never buffer any data.
Happy Learning !!
Top comments (0)