Node.js was developed by Ryan Dahl in 2009 and it’s Latest LTS Version: v6.10.0 (includes npm 3.10.10)
You Can Use Node.js >>
- Data Streaming Applications
- I/O bound Applications
- Data Intensive Real-time Applications
- Single Page Applications
- JSON APIs based Applications
You Can Not Use Node.js >>
- For CPU intensive applications.
Some features of Node.js:
- Asynchronous and Event Driven − All APIs of Node.js library are asynchronous or nonblocking. Node.js based server never waits for an API to return data. Server moves to the next API after calling it and a notification mechanism of Events of Node.js. It helps the server to get a response from the previous API call.
- Very Fast − Fast in code execution.
- License − It is released under the MIT license
- Single Threaded but Highly Scalable − Node.js uses a single threaded program. It serves to a much larger number of requests than traditional servers like Apache HTTP Server. Event mechanism helps the server to respond in a non-blocking way and makes the server highly scalable as opposed to traditional servers. It creates limited threads to handle requests.
- No Buffering − Never buffer any data. These applications simply output the data in chunks.
#PHP Vs Node.js
- Mixing code with content
- Deep code base
- New code is helping it catch up
- No client app needed
- Speed of coding
- Separating concerns
- Newer code means more modern features
- Complexity of closures and more
- Dozens of language options
- Service calls are thinner than HTML-fat PHP calls
- Raw speed
Top sites built with Node.Js:
- Google: The search service alone services 100 billion requests a month by 2015, making it the most visited website in the world.
- PayPal/eBay: Simplified their development process. Node.js powers their web applications and has allowed their teams to move much faster in bringing their designs to life.
- Netflix: It significantly improved build times, allowing iterate faster, as they would no longer have to wait 40 minutes for it to compile.
- Uber: For their dispatch system matching drivers and riders.
- GitHub: They use Node.js to serve downloads of repositories.
- Yahoo: A project intended to eliminate the multi-language scenarios that introduce complications for developers.