Application Framework with node.js

Sachini Rasanga
3 min readApr 21, 2022

Overview of this blog?

This is written to get knowledge about node.js and node package manager.

What is node.js?

Node.js is a platform build on chrome’s JavaScript runtime for easily building fast and scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data intensive Realtime applications that run across distributed devices.

Node.js is an open source, cross platform runtime environment for developing server side and networking applications. Node.js applications are written in JavaScript and can be run within the node.js runtime on ox, Microsoft windows, Linux.Node.js is also provide rich library.

Where to use Node.js?

I/O bound applications

Data streaming Applications

Data intensive Real-time applications

JSON APIs based application (DIRT)

Single page applications

Features of Node.js

Asynchronous and event driven

All APIs of Node.js library is asynchronous, that is non-blocking. It essentially means a Node.js based server never waits for on API to return data. The server moves to the next API after calling it and a notification mechanism of Events of Node.js helps the server to get response from the previous API call.

Very Fast

Being build on google chrome v8 JavaScript Engine, Node.js library is very fast in code execution.

Single threaded but highly scalable

Node.js uses a single threaded model with event looping. Event mechanism helps the server to respond in a non- blocking way and makes the server highly scalable as opposed to traditional servers which create limited threads to handle request. Node.js uses a single threaded program and the same program can provide service to a much larger number of requests than traditional servers like Apache HTTP server.

No Buffering

Node.js applications never buffer any data. These applications simply output the data in chunks.

License

Node.js is released under the MIT License.

Advantages of Node.js

· Scalability

· Extensibility

· Caching

· High performance

· Cross-platform Development

· Single programming Language

· Easy to learn

· Full stack JavaScript

· Large community

Disadvantages of Node.js

· Lack of Library support

· High demand for experienced resources

· Heavy computing tasks

· Asynchronous programming model

· Unstable API

Node packager manager

The world’s largest software registry (Library). The registry contains over 800,000 code packages. Open-source developers use npm to share software. Many organizations also use npm to manage private developments.

How to install Node package Manager (NPM)

Ex:

npm install express

npm install mongoose

--

--