TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Should I switch from PHP to NodeJS?

6 pointsby vsakosover 11 years ago

9 comments

munimkaziaover 11 years ago
PHP and Node.js happen to be the two languages&#x2F;platforms I am most proficient with. I don&#x27;t think one can be completely replaced by the other for all situations. It really depends on what you are planning to do with it. If you use PHP to develop websites&#x2F;apps and you aren&#x27;t facing issues with scaling&#x2F;load, you can continue with PHP, which has a bigger ecosystem compared to Node.js.<p>If you want to deploy a real time app or a socket or tcp server, or even a high load API, you can give Node.js a shot. Node.js can do normal web stuff too, but I don&#x27;t know any good reason why you would want to learn and use it when you are already proficient with PHP.<p>For the sake of simply learning it, just go ahead and learn it.
workhere-ioover 11 years ago
Unless you have a job offer that specifically requires you to use Node.js, it&#x27;s not really a question of &quot;switching&quot; - it&#x27;s more a question of adding Node.js to the list of frameworks you know.<p>As far as jobs go, outside of Silicon Valley it seems that there is still a huge market for PHP programmers, and those Drupal&#x2F;Joomla&#x2F;Magento&#x2F;WordPress sites aren&#x27;t going away any time soon.<p>I&#x27;d also recommend Python, which many PHP programmers instantly like. Getting started with Flask (<a href="http://flask.pocoo.org/" rel="nofollow">http:&#x2F;&#x2F;flask.pocoo.org&#x2F;</a>) should be fairly easy. Several big sites like Instagram and Pinterest are powered by Python.
sbahr001over 11 years ago
Everyone is right. Learn both, remember each of these are tools. Once you learn them well you will know which is a better tool for what you are doing. Here is a real-life example from my experience: Project was built with PHP(MVC) and Ngnix(Apache alternative). Node.js was used for a real-time chat and comment system, previous used PHP. - Note Node.js is so much more but for the project it was easier to implement with node.js, and worked a lot better, than the previous php implementations(for us). I hope this helps.
czbondover 11 years ago
Without context, we it is hard to say. What are you developing, for whom, and why? If you&#x27;re a solo developer, the answer is different than if you&#x27;re an agency or startup. What types of products are you creating? Are you worried about pay [eg: php developers usually have a lower rate than hourly or js]. Can you provide more context?
评论 #7091732 未加载
27182818284over 11 years ago
Don&#x27;t switch existing apps to it unless you have a good reason, but knowing PHP <i>and</i> Node makes your resume look better than just PHP.<p>Also it is always great to try new paradigms as they open minds more. So double yes for that reason I guess.
chany2over 11 years ago
Going to the same situation. I decided on NodeJS vs Ruby on Rails or Python because I am mostly a front-end engineer; so advancing in JS skills is good.<p>There is a lot of PHP resources on the web; so I don&#x27;t have you have to give it up.
krappover 11 years ago
I think a better way to frame this question would be &quot;should I include NodeJS in my repertoire?&quot; And I would say &quot;sure, why not?&quot;
jordsmiover 11 years ago
It really all depends on what you plan on working on. Really I would suggest any of the frameworks over plain PHP... rails, django, etc
c2uover 11 years ago
PHP is great, but for beginner nodejs is better. If you are very good at PHP, you don&#x27;t need to.