Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (47.6k points)

I am new to this kind of stuff, but lately, I've been hearing a lot about how good Node.js is. Considering how much I love working with jQuery and JavaScript in general, I can't help but wonder how to decide when to use Node.js. The web application I have in mind is something like Bitly - takes some content, archives it.

From all the homework I have been doing in the last few days, I obtained the following information. Node.js

  • is a command-line tool that can be run as a regular web server and lets one run JavaScript programs

  • utilizes the great V8 JavaScript engine

  • is very good when you need to do several things at the same time

  • is event-based so all the wonderful Ajax-like stuff can be done on the server side

  • lets us share code between the browser and the backend

  • lets us talk with MySQL

Some of the sources that I have come across are:

Considering that Node.js can be run almost out-of-the-box on Amazon's EC2 instances, I am trying to understand what type of problems require Node.js as opposed to any of the mighty kings out there like PHP, Python and Ruby. I understand that it really depends on the expertise one has on a language, but my question falls more into the general category of When to use a particular framework and what type of problems is it particularly suited for?

1 Answer

0 votes
by (106k points)
edited by

The best use of Node.js is for real-time applications: online games, collaboration tools, chat rooms, or anything where what one user (or robot? or sensor?) does with the application needs to be seen by other users immediately, without a page refresh.

Another place where Node.js is used is with Socket.IO the combination of Node.js and socket.io  will reduce your real-time latency even further than what is possible with long polling. 

Want to become a Salesforce expert, join Web Development Courses Online Training now!

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
2 answers
0 votes
2 answers
asked Oct 16, 2019 in Web Technology by Sammy (47.6k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...