What’s better? Ruby on Rails vs. PHP

A friend of mine has a project where he wants to make a social community and was unsure which way to go. He asked me to ask you guys of help. It is the question which is discussed everywhere - Ruby on Rails vs. PHP - but most of them are not very neutral. Many of them are too pro for Ruby on Rails or too pro for PHP.

ruby-vs-php Whats better? Ruby on Rails vs. PHP

Ruby on Rails is a relatively new and young programming language. By doing a research for advantages and disadvantages. PHP is easy to learn and many people have experience with it. In our mind are some more important questions.

What’s about:

  1. Performance?
  2. Security?
  3. Scalability?

This is an invitation for all of you to make your point of view clear, so that this question will be asked the last time!

It’s your turn: What’s the best- Ruby on Rails or PHP?

Share the love

BTW: Good Quality Brochures Online Color Printing at PsPrint.

Spread this KnowTe

Digg Del.icio.us Stumble Float Technorati Bump
Whatever you want to say!

Kalpana
Sep 24, 2011
No: 18 / ID: 9540

Thanks for this opinion


LionHeart
Jun 25, 2011
No: 17 / ID: 8629

Thanks for this post. After reading all comments I decided on PHP instead because I’m expecting a lot of Flex/Flash integration and it seems PHP has a lot tutorials and help resources.


Dhawal
Mar 28, 2010
No: 16 / ID: 5911

used both Rails and PHP’s CakePHP & Zend Framework. I prefer Rails just because Rails use Ruby. But if you are planning to add RIA (Flex) in future I would say go with PHP’s Zend Framework, I find more resources helping me integrate Flex with PHP then rails. If you are planning to integrate something then think before choosing rails, else rails is clear winner.


paris d’argent
Mar 17, 2010
No: 15 / ID: 5840

Some good points here thanks. Another good practice is to keep your includes, application logic and class files in a directory not accessible by the web root. What I ofter do is to provide my clients with both a public and private directory so that they practice this concept. Then I tell apache that it only handles requests out of the “/usr/home/web/user1/public” directory so that they can place all of their application files in the “/usr/home/web/user1/private” directory and theres no way it will get served up by apache.


WeaponsTheyFear
Mar 16, 2010
No: 14 / ID: 5824

Having experience with both, I have to say go with what you are more familiar with, and with what your developers are capable of. Note, it is much easier to find PHP programmers than Ruby/Rails developers.

Many argue pro RoR, thinking strickly that rails performs better, but then again Facebook uses PHP, so it can’t be that great. Even Google uses PHP.

My preference lays in favor of PHP, because I prefer the C style syntax, although Ruby has many great advantages in its code (namely many shortcuts for iterations).


Birjesh
Jan 20, 2010
No: 13 / ID: 5535

Php is batter the ROR


Kyle
Jan 04, 2010
No: 12 / ID: 5458

From What I know many php programmers migrated to ruby on rails because of it’s agile development and other things. But I never heard anyone use ruby and migrated to php…


Knowtebook
Oct 09, 2009
No: 11 / ID: 5032

hey zippo, thanks for your comment. very interesting. can you tell us, where you would use php and when you would use ruby then?


zippo
Oct 08, 2009
No: 10 / ID: 5028

Nobody gave a reason why you can’t compare a scripting language to a framework. You say that because it just hears strange, but that’s OK…

What you can’t compare is PHP to Ruby, because they both has another targets.
What makes Ruby comparable with PHP is it’s frameworks.


Knowtebook
May 17, 2008
No: 9 / ID: 863

thanks peat for your opinion. the problem we are meeting since 2 months of searching a programmer is that if we ask a php developer, he would do it in php of course, and if we ask a ruby developer he says ruby would be the best. what we were looking for are people with knowledge of both and who can advise us. it seems to be more difficult that we thought.

what is so special about seaside?


Peat Bakke
May 16, 2008
No: 8 / ID: 847

@randal, @james — Seaside is impressive to see in action. One of these days I’ll have to spend some time tinkering with it!

@knowtebook —

From your brief description, there isn’t anything about your project that seems to demand a particular framework or language, so it sounds like you should focus on finding good developers who have built similar types of projects, regardless of the language they use.

If this were my project, I’d probably build the core site on Rails, and those widgets and plugins may have to be written for whatever kinds of blogs you’re targeting. PHP for WordPress blogs, for example.

Regarding Ruby not being compiled: this shouldn’t be a problem, as people visiting your web site don’t have access to the source code (it never leaves the server). Same goes for PHP, or any other scripting language used for building web apps. Of course, if someone breaks into your server they can look at whatever they want, but access to the source code is probably going to be the least of your worries. :)


Knowtebook
May 16, 2008
No: 7 / ID: 844

Okay thank you guys. I understand the question between ruby and ruby on rails. Of course i meant Ruby then. seaside sounds really new and i doubt it is already time for it, since the community seems to be smaller. nevertheless. lets compare it too! what do you think is and why is it better: seaside or ruby?

@Peat Bakke:
Well we want to make a whole site with frontend and backends from scratch. We also need an ad management and billing system for free and premium users so the point of security comes in place. in addition to that we need the whole variety of social community extensions like toolbars oder widgets for your own blog. I think there is much potencial for extending the site and thats were another friend of mine said it would make more sense to use ruby.

On the other hand, i heard that ruby will not be compiled and the source code is available to anybody which knows how to get to it. If that is true, the point of copyright law and security makes me afraid. What would you guys say to that?


Peat Bakke
May 16, 2008
No: 6 / ID: 842

Before I can answer, I have a question for you: what are you trying to build?

That’s the question that defines that language or framework is right for the task. Performance, security, and scalability are all qualitative terms — you should offer up a specific scenario (or even better yet, a set of wildly differing scenarios) and see which fills the bill.

For example … if I’m working with a company that has an existing database in place that they want to tap into with their web application, I’m probably going to pick PHP or Java over Rails, because Rails has strong opinions about the structure and style of databases it works easily with.

On the other hand, if I’m under the gun to produce a typical volume web application (like a blogging system, or an e-commerce site) from scratch that’s expected to serve thousands of people per month, I’m definitely going to go with Rails.

Building a banking application? Java.

Working with a lot of Microsoft server components? .Net

Context is everything for these sorts of questions. :)


Randal L. Schwartz
May 15, 2008
No: 5 / ID: 839

For performance, security, and stability, you should strongly consider Seaside instead of either Rails or PHP. (http://seaside.st)


EllisGL
May 15, 2008
No: 4 / ID: 838

This question is invalid, since Ruby on Rails is a frame work for the Ruby language. The question should be Ruby vs PHP.

As for my preference, I chose PHP over Ruby for the language syntax and the large community. Never mind the fact I’ve been working with PHP for about 10 years now.


James Robertson
May 15, 2008
No: 3 / ID: 837

You might want to add Seaside (Smalltalk) to your list of web frameworks to consider. Have a look here:

http://www.seaside.st


Tim
May 15, 2008
No: 2 / ID: 836

You make me want to cut myself.

You can’t go around comparing a framework to a scripting language. At least compare it to something like CakePHP.

Leave a comment!
Note: You can also use your free Gravatar avatar on Knowtebook! Please also read our Publishing Policy before posting.

Trackbacks/Pings
Trackback-URL

[…] hasse diesen Schwachsinn, like What’s better? Ruby on Rails vs. PHP. Na, wer von euch hat wohl den Längsten? Äußerst interessant, fragt sich nur für wen. Wie kann […]