Live data from Hacker News

Ask HN: PHP or Ruby?

news.ycombinator.com

21–30 of 32 posts

Re: Ask HN: PHP or Ruby?

#21
This question needs a lot more context for any answer to be useful. Who's the developer? What's the long-term plan? What's your own background? What does the app do?

I hate to say "It depends", but sometimes it really does.

Re: Ask HN: PHP or Ruby?

#22
Both

Neither

Do some research and find which one works best for the product you envision building. If they both sound like a good fit, go with whatever one you can get help with more easily, since you mention (in the comments) you're not a programmer.

Re: Ask HN: PHP or Ruby?

#23
If you are concerned with Ruby and scalability, use JRuby on top of Tomcat. It does give you a few pieces of magical scalability, however (and more importantly) it allows you to work with "enterprisey" Java tools/libraries/systems that allow you to reach reasonable levels of scalability quickly.

And read this - http://www.ruby-forum.com/topic/1119702

Re: Ask HN: PHP or Ruby?

#24
Are you going to be writing the majority of the code? If so, try out both languages for a few days each and see which you like better. Spending a week choosing the right tool for the job will save you countless hours in the future.

If you're outsourcing the development then you shouldn't be concerned about which language is used. You should be looking for a team of developers who know what they're doing and have experience building systems similar to yours.

Performance and scalability shouldn't be factors when choosing a language, either. Good caching and a delivery network like Akamai or CloudFlare will be more than enough for most large websites. I work on several large (100k+ visitors/day) websites that run on PHP - we get by just fine by caching the hell out of everything on multiple levels (web server, traffic manager, Akamai).

My advice is to focus on the end product, not the implementation. Don't get caught up in which technologies to use, or you will lose sight of what you want to create.

Re: Ask HN: PHP or Ruby?

#25
Do you already know one of these languages? You know what they say about photography: the best camera is the one you have with you. The same goes for programming: if you already know how to build something in PHP, there's not much sense trying to make the project in Ruby.

If you know neither, try both of them for a short while and see which one you like better. It's really a 'what do you like better: apples or oranges' kind of question.

Re: Ask HN: PHP or Ruby?

#28
post #13
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?

Hmm... Do you have plans of building something at Twitter scale? If you can foresee that, then I guess you are right when you are considering Twitter's case of dropping Ruby. I am no Ruby-ist but I am sure Ruby is not that bad that you will have troubles scaling. You just have to understand how to scale and you can use either PHP or Ruby to apply the general concepts of scalability.

Twitter didn't "drop Ruby". They just replaces (huge) parts of their stack by other things that might or might not written in their old default language. As will anyone that has to work at their scale. Their frontend was still Rails for a long time (or still is, in parts?).

Example: see what they have to offer as open source. Still quite a bit of Ruby: http://twitter.github.com

Re: Ask HN: PHP or Ruby?

#29
I agree with many of the other comments here (I prefer ruby myself, but agree that the architecture is what determines scalability).

On the PHP bit, I've done a fair amount of PHP work, but am trying to avoid it for the following reasons: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de...

Re: Ask HN: PHP or Ruby?

#30
I'd suggest you consider: 1. Labor costs. Ruby developers may be twice as expensive as PHP ones given the same level of tasks to be solved. 2. Labor availability. Whether it is easier for you to find PHP programmer or Ruby programmer when you need one?

For me in Russia answer is definitely PHP, Ruby guys are rare and expensive here :)

Post reply on HN