Should I Learn Node.js or PHP?
Should I learn Node.js or PHP?
If you asked the same question back in 2010, I would have said PHP. Node.js was too new to be a serious contender.
That was then. What about now?
Walmart and Paypal are adopting Node.js for their web portals, not PHP.
I’m not sure Walmart’s adoption of anything should matter in terms of IT.
Node.js handled 200 million customers on Black Friday, 2013 for Walmart and didn’t go over 1% utilization. Node.js handles twice as many requests per second and has faster response time to each request, and its recent performance is going to increase its adoption.
I think Netflix’s implementation is a bigger deal in terms of the adoption of node.JS. But it’s based on Java.
There are jokes that you can do everything in Java except make coffee.
Node.JS is far better if you do long-polling, such as having many ports open for long periods of time. But not all applications require that.
I know. Use node.js for chat panels and social media functionality, but use PHP to render your webpages.
PHP has more hosting options.
Node.js has faster load times for web pages.
It doesn’t have as many administrators to run it.
That can change very quickly. And Node.js is non-blocking, so you don’t accidentally drop a customer in the process of purchasing something, which will push its adoption rate.
Is node.js going to replace PHP?
PHP is still king in content management systems. And while Node.js can handle massive volumes of requests like stock tickers, it doesn’t work well when each request requires a lot of calculations to be performed like engineering application data exchanges.
It sounds like node.js is the wave of the future.
For a lot of applications, yes. But PHP still has a niche.
I’ll leave that for those who are already trained in PHP, who I’ll never catch up with. I want to get ahead with Node.js.
source