Learning About Node.js For Beginners
What is Node.js?
It runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.). It is used to develop I/O intensive web applications like video streaming sites, single-page applications, and other web applications.
- Ryan Dahl invented Node.js in 2009.
Node.js uses asynchronous programming!
Node.js is primarily used for non-blocking, event-driven servers, due to its single-threaded nature. It’s used for traditional web sites and back-end API services, but was designed with real-time, push-based architectures in mind.
The following diagram depicts some important parts of Node.js.
Features of Node.js
- Asynchronous and Event Driven
- Very Fast
- Single Threaded but Highly Scalable
- No Buffering
REFER MORE TO LEARN FURTHER ABOUT NODE.JS!
Where to Use Node.js?
Following are the areas where Node.js is proving itself as a perfect technology partner.
- I/O bound Applications
- Data Streaming Applications
- Data Intensive Real-time Applications (DIRT)
- JSON APIs based Applications
- Single Page Applications
Where Not to Use Node.js?
It is not advisable to use Node.js for CPU intensive applications.
What Can Node.js Do?
- Node.js can generate dynamic page content
- Node.js can create, open, read, write, delete, and close files on the server
- Node.js can collect form data
- Node.js can add, delete, modify data in your database
Advantages of Node.js
- Open Source
- Node.js is fast
- Asynchronous I/O
- Active community support
- Rest API
- Caching modules
- Less problems with concurrency
- Unit Testing
- Streaming Data
Disadvantages of Node.js
1. Not effective with large scale applications
3. Not suited for CPU-intensive tasks
4. Poorly supported to relational databases