Introtuction to Node.js
This week I have been really busy, It's been a real challenge to get this post out. I haven't manage to get some buffer between my writing and releasing posts, but I definitely will do this in near future. This post will be about Node.js, simply because I was busy with it in whole weekend with my work tasks. I have using Node.js a month now and I still find that I don't get the point of Node.js or I feel like I misuse it. So I decided to take a closer look.
What is Node.js?
When should I use Node.js?
Node.js is a perfect solution in following areas:
Data streaming applications.
Data Intensive Real-time applications.
JSON APIs based Application.
Single page application.
I/O bound application.
The bad part
As I mentioned earlier, Node.js has the largest package ecosystem - this is a really good advantage for those who know how to use it. The problem is when a new developer starts to use Node.js and his/her knowings about Node.js are minimum. The result will be package hell - where for a small functionality is used a lot of packages. Some packages are old, and no one hasn't maintained them for years. So to see what packages are good and what bad, we need to understand Node.js.
What should I know, before starting?
Learning Node.js can be really challenging. From my experience, the best way to get started would be:
Learn and understand latest ECMA script (right now it's ES6). Yes, that mean before getting started, make sure you understand functions, callbacks, promises, prototypes, classes, closures and so on.
Understand the non-blocking Node environment. Again this includes callbacks, promises, async patterns and so on.
Learn the global variables.
Learn the concurrency model.