views:

243

answers:

7

I am about to embark on a project which will be a database with potentially thousands of entries. It is for an Australian audience so load should not be particularly high. The developer who is interested has a strong preference for RoR. However I am unconvinced of the benefits of RoR for all aspects of a project.

For example, while RoR seems faster to write, it seems to take more time in terms of server maintenence. Also in terms of potential for others to take over the project in the future, there seems to be fewer RoR developers compared with PHP. So I guess I'm concerned that while RoR might seem faster up front, that over the longer term, PHP might be more efficent in terms of stability, maintenence and potential recruits.

I know from experience that developers tend to be passionate about such comparisons and this is a concern for me as I want the decision to be based on objective measured criteria rather than subjective personal opinions. I'm not trying to offend anyone in either camp, just wondering if my personal observations are valid?

+4  A: 

A database-driven website with thousands of entries and low load can run on pretty much anything just fine.

In this case it sounds like you know PHP well but not RoR. I say this is a great opportunity to build a medium-sized website while learning a new language. The site is small enough that you can make a few mistakes and not see much of a performance hit.

Triptych
The developer in question was professional PHP developer (plus front end) for some years and now works in RoR for all professional projects. For his personal projects he uses Camping and lately has introduced Sinatra due to problems with Camping. However he recommended Rails for this particular project.
Sandpiper
+3  A: 

In my dealings with both languages, the initial constructs for RoR are indeed faster, as that is what RoR is designed for, but the ability to modify and maintain code in conjuction with the database is simpler and more straight forward with PHP. It is also easier to find web hosts that can run PHP than it is for RoR. Since the database you use for each language can vary, the number of entries and load demand isn't necessarily important in the decision on which of the two might be better for your long term needs.

MaQleod
Thanks for that MaQleod. I get the impression that there is a wealth of personal/professional experience with these topics but no empirical studies comparing these variables over various frameworks/languages?
Sandpiper
No empirical study would exactly duplicate YOUR requirements, YOUR environment, and YOUR developers' skillset. There is simply not an overall empirical answer to your question. Different frameworks are best in different circumstances. You said above you had a developer recommendation... go with that if you trust the developer. If you don't, find another developer.
mmc
+11  A: 

PHP is a Language. RoR is a Language + Framework.

You should have asked "How does [some popular PHP Framework, like CodeIgniter] compare with RoR?"

Better yet, check out PHP on Trax. It's a fracking clone of RoR for the most part. PHP can do virtually anything Ruby can do, but the same can't be said, at least not now with RoR's substantially smaller collection of extensions, tools, and open source codebase.

hopeseekr
The question is clearly about deciding between PHP or Ruby. The fact that he is using RoR is just added information. If he takes the PHP way he obviously can choose from a variety of frameworks.
Sebastián Grignoli
Can't believe this answer is being downvoted... This is most important aspect of the issue!
dkamins
Well, I've never heard of Codelgniter nor do I know what a fracking clone is but thanks for the input.
Sandpiper
PHP on Trax does virtually every thing Ruby on Rails does in almost the exact same manner.
hopeseekr
CodeIgniter is a very popular PHP framework that supports ActiveRecord, one of the major benefits of using RoR.
hopeseekr
@Sebastián Grignoli He probably doesn't even know that PHP frameworks exist, or that Rails is a Ruby framework! You would be **amazed** at how few people on either side realize this.
hopeseekr
He? If you are referring to the person who asked the initial question that was me and I am a she. If people here would like me to acknowledge that there are frameworks as well as languages then fair enough they are different things and thankyou for the reminder. The combinations I am familiar with are RoR or Ruby with Camping or Ruby with Sinatra or PHP with (my dev tells me) Cake, for example. He tells me didn't use any frameworks with PHP which I guess explains why I've never heard of them.
Sandpiper
Ruby can do the same things that PHP and any other scripting language is doing. The only thing that you should be careful in PHP is what PHP framework you will choose if you go that path. There are many PHP frameworks that are not mature enough. RoR on the other hand is the biggest and one of the most mature frameworks right now and you will find everything that major frameworks has.
JohnDel
@Sandpiper I apologize for the emotional tone in my response; there's no excuse, except that I see this sentiment **all** the time hundreds of places and wished to say it loud and clear ;-)
hopeseekr
+7  A: 

Which is better for database design, RoR or PHP

None.

The database is completly separated from the server language.

Frankie
Seriously. This question hits the nail on the head. At the very least, the OP needs to understand the difference between a database, a language, an application, and a framework before he can make this decision.
blucz
+3  A: 

Rails is to Ruby as CakePHP is to PHP.

I have never worked with RoR, but I have heard horror stories about having to continually reboot servers, outages, etc. I don't know if it is poor coding practice, or the framework itself. But if I remember right, these are some of the issues that have plagues the likes of twitter.

On the other hand, there are sites that run on PHP that haven't had nearly as many issues. (facebook, firefox addons, etc.)

My choice is PHP, but it's because it's what I know and is designed for web development.

cdburgess
I think perhaps they both have their various pros and cons so it might depend on the project which is why it would be useful to have some kind of study comparing them so that people who do not already have a preference can decide based on which variables are most important to their project. I suspect my own assessment may be different from my developer's because we are approaching it from different angles. It is good to hear alternative views.
Sandpiper
+1  A: 

I don´t really know a lot about RoR, but if the project is extremely important and the performance is critical, PHP is the sure bet.

Anyway, I'd choose RoR just to learn new ways of doing things.

I am a Senior PHP developer, and the best advice I believe that I could give you is: Never miss a chance to learn something new.

Sebastián Grignoli
+1 for the advice.
codaddict
Except he`s not a programmer. He admits it himself he manages developers and is choosing there next tool ;-)
Iznogood
I'm actually a she but I'll forgive the assumptions.
Sandpiper
The continual correction of he/she is getting tiring. "He" is used in situations of indeterminate gender. If it really bothers you that much, please specify how you would like to be addressed in future questions.
mmc
If she´s not a programmer then PHP is the better option, I think.Anyway, programmers in the same situation can reach this page in the future, so this answer is my advice to them.
Sebastián Grignoli
that is the best advice you can give ;)
toomuchcs
+2  A: 

I have managed few PHP and Ruby projects. In my view, framework and performance should not be the deciding factor for your selection(E.g: CakePHP is comparable to Rails and Rails performance is not an issue for small/medium sized websites). I would avoid making the PHP vs Ruby comparison as it is subjective(at least from product manager/client perspective).

PHP

  • Large developer community(in high cost and low cost centers)
  • Reasonable hourly rates
  • Large choice of hosting services

Rails

  • Smallish developer community ( mostly in high cost centers)
  • Higher hourly rates(at least I had to pay higher)
  • Tricky deployment
  • Vocal, opinionated and active community(lot of developers maintain blogs)
  • Long list of high quality libraries(gems).
  • Good gem distribution mechanism.
  • Slightly content programmers(I know this is contentious, I am just referring to the teams I have managed).

PS: Heroku solves lot of Rails deployment issues.

Select Rails, if you have a good Rails developer in hand and if you are confident of hiring few additional resources in the future.

Otherwise go with PHP (CakePHP, Symphony, CodeIgniter etc.)

KandadaBoggu