Google a few beginner tutorials, play with Express and you’re off to the races, right? Then you realize you’ll need to settle on a database. Shortly after that, you start writing more complex queries and start getting lost in calibacks. Naturally you read about callback hell, chop down your Christmas tree and start using one of the many promise libraries. Now you just “Promisify” all the things and grab a can of coke. Error management must be the most time-consuming and painful task in keeping Node.JS environments stable. This is happenfng mostly due to the ‘one thread’ model and the lack of proper strategy for error paths in asynchronous flows. Node is good in handling errorsComing from other languages such as Python, Ruby or PHP you’d expect throwing and catching errors, or even returning an error from a function would be a straightforward way of handling errors. Not so with Node. Instead, you get to pass your errors around in your callbacks (or promises)—thats right, no throwing of exceptions. The most notable library right now is Bluebird. It’s quite good, fast and does a nice job of making things ‘just work”.
However, I find having to wrap my requirements in Promise. promisifyAll() extremely hacky. Node.js is designed for server-side scripting as a solution to enterprise problems. Node.js is a great framework for all your scalable architecture needs. Node.js is the biggest’ open source platform ever- with 15 million± downloads/month and more than a billion package downloads/week. Contributions have risen to the top as well since now we have more than 1,100 developers who built Node.js into the platform it is now. Node.js also create a ‘maintenance endpoint’ and use tools that automatically detect vulnerabilities. Node.js is good highly scalable web servers for web applications.
As we know nothing is perfect in this universe there are few thing’s which were not like by some users, but the Node.js API is still somewhat changing, and as it matures, certain parts are more reliable than others. Some are so proven, and so relied upon, that they are unlikely to ever change at all. Others are brand new and experimental, or known to be hazardous and in the process of being redesigned.
MUHAMMAD SADIQAIN, OBED CHAUDHRY,
Lahore, December 16.