Live data from Hacker News

Ask HN: PHP or Ruby?

news.ycombinator.com

1–10 of 32 posts

Ask HN: PHP or Ruby?

#1
Looking to build a website with social networking elements to connect people. Which is a better choice, PHP or Ruby? Need to consider scalability, performance, ease of development, support, hosting...

Re: Ask HN: PHP or Ruby?

#2
I personally prefer PHP, having used both.

I'm not saying that Ruby is better or PHP is better, it really depends on your ability with the two, but from what I have found in the past, PHP has been easier to scale and has performed well, it is also more widely hosted, though this is really irrelevant as there are still plenty of ruby hosts.

Support for PHP is generally better as it has a larger user-base but generally Google is your friend either way.

You should make the decision based on personal preferences, for instance, I find Ruby much more fun to write, but I can't stand debugging it, whereas I have used PHP for so long that now, those stupidly bad error messages are actually a native language to me.

Re: Ask HN: PHP or Ruby?

#3
The one you are more comfortable in developing. Choice of framework is more important. If you are good in PHP choose a framework like codeigniter or symfony. If you are good in Ruby choose a framework like Rails.

I have developed in all php, ruby, python and my personal favorite is Python/Django or Python/Flask.

If you want to use any 3rd party api e.g., Facebook API make sure it has official SDK for language you choose.

Re: Ask HN: PHP or Ruby?

#5
Scalability doesn't have anything to do with the programming language but rather with the architecture. The same goes for performance unless you're talking about pure number-crunching. The ease of development depends on your experience with either toolset.

I'm sorry if this sounds harsh, but by asking this question you sound like you aren't a programmer but rather somebody that wants to go to rent-a-coder and have somebody build 'the next facebook'.

Re: Ask HN: PHP or Ruby?

#6
Am considering Ruby at the moment. But reminded of Twitter dropping Ruby due to certain reliability issues. Hence having second thoughts. Or am I a little ahead of myself here worrying about something that may never affect me?

Re: Ask HN: PHP or Ruby?

#7
None of the points you list have any relevance for making a choice. The two languages are so similar, that it's (imho) entirely a matter of taste which you prefer. If you have experience in either, probably go with that. If you don't, see what your immediate support network prefers and go with that. You're going to need their help when you get stuck.

Re: Ask HN: PHP or Ruby?

#8
post #6

Am considering Ruby at the moment. But reminded of Twitter dropping Ruby due to certain reliability issues. Hence having second thoughts. Or am I a little ahead of myself here worrying about something that may never affect me?

Yes, you are.

Re: Ask HN: PHP or Ruby?

#9
post #5

Scalability doesn't have anything to do with the programming language but rather with the architecture. The same goes for performance unless you're talking about pure number-crunching. The ease of development depends on your experience with either toolset. I'm sorry if this sounds harsh, but by asking this question you sound like you aren't a programmer but rather somebody that wants to go to rent-a-coder and have so…

You are right, partly. Am more of a DB person with a minimal understanding of scripting languages. Hence the reach-out. About building the next facebook, I would love to.
Post reply on HN