N Reasons to choose Nodejs

Source: Internet
Author: User

N Reasons to choose Nodejsauthor Madequi released on September 25, 2014

Caleb Madrigal is a software consultant from Milwaukee, USA. Four years ago, when he heard the phrase "use JavaScript as a server-side language," he thought it was a ridiculous idea. There are so many server-side languages to choose from, why Choose JavaScript? That was what he thought at the time. But now he has chosen Javascript/node.js in the current project. He has recently written an explanation of this change.

First, many top enterprises use node. js, and it works very well, including PayPal, Walmart, Ebay, Groupon, and LinkedIn. These enterprises use node. JS in a large number of production environments. Madrigal An example of PayPal. PayPal compared its node. js version and Java version to one of the most traffic on their site, discovering that the former is better than the latter in many ways and ultimately decided to switch from Java to JavaScript. Infoq has reported this.

Second, node. JS has a great package management system NPM. You can install almost any package/library by running the NPM install package name. In addition, dependencies can be tracked by Package.json files. Therefore, the node. JS Library is easy to clone and running NPM install installs all dependencies.

Again, the node. JS community is unusually active and always has new libraries to produce. These libraries are very useful and make JavaScript a very efficient platform.

Then is the node. JS repl (read-evaluate-print Loop) command line. Developers only need to enter "node" in the terminal, so that node. js can be tested on a line-by-row basis.

Finally, node. JS has a very important feature: non-blocking functions. That's why we see a lot of callbacks and promises in node. js code. This design pattern brings very good performance to node. js.

In addition, the biggest advantage of node. JS is that it is JavaScript. Anyone knows JavaScript, so using node. js doesn't require learning a new language. With it, developers can use only one language, with JavaScript on the browser side and node. js on the server side. This greatly simplifies the data transfer task between the database and the user interface when using a document database that stores JSON objects such as MongoDB and COUCHDB.

N Reasons to choose Nodejs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.