...

View Full Version : Ruby vs. PHP



savantcreative
12-22-2010, 05:20 PM
Can anyone explain the differences between PHP and Ruby On Rails in terms of what can be done with them and ease of use?

jmace
12-29-2010, 06:52 AM
Never took the time to learn Ruby, but this may help:

http://blogs.computerworld.com/15460/perl_vs_php_vs_ruby

oesxyl
12-29-2010, 08:40 AM
Never took the time to learn Ruby, but this may help:

http://blogs.computerworld.com/15460/perl_vs_php_vs_ruby

"But Perl syntax can be difficult to handle not only for an occasional coder like me, but programming pros."

this is like talking about avantages and disavantages to be pregnant, i don't know how it is but i have a opinion, :)

best regards and happy holidays

savantcreative
12-29-2010, 01:27 PM
Never took the time to learn Ruby, but this may help:

http://blogs.computerworld.com/15460/perl_vs_php_vs_ruby

Thanks for your post. Upon reading the article I see that there are pros and cons to both. I have heard that Roby is faster to work with.

JamieD
01-10-2011, 11:47 PM
PHP is a programming language, Ruby on Rails is a programming framework written in Ruby. You would be better comparing PHP with Ruby or something like CakePHP with Ruby on Rails to get a similar comparison.

You would be able to do virtually anything in Ruby that you can do in PHP, there would be very little (dare I say nothing?) you could do in one that you couldn't do in the other.

I'd advise taking a look as both of the languages and having a play around with them to see which you like and get on with the best. They have very different philosophies and ways of working and you may find you get on better with one that the other. Ruby has a much more engrained philosophy of testing and test/behaviour driven development which is not as prominent in the PHP community if that's a consideration.

I've personally used both extensively for many years however I now only code in Ruby because I much prefer it and get far more enjoyment out of coding in the language.

savantcreative
01-11-2011, 02:18 PM
Is there any benefit in learning php first? Thanks

cmcc333
02-03-2011, 10:23 PM
I'm going through this decision making process myself. I haven't programmed for 15 years and have set myself a goal of developing a web application which earns more than 500 per month.

I've been research development technologies and am overwhelmed by the number of options.

The main thing I've found is getting unbiased comments on either PHP or Ruby on Rails is near to impossible. Most people out their seem blindly loyal to one or the other.

On first impressions it's clear that PHP is much rawer. You are able to carefully control everything and do things very well or very badly.

Ruby on Rails seems to offer a much faster development cycle due to it being a framework but you are slightly further removed from full control.

To me both have merits and I am investigating both for a while before deciding on which technology to go with.

Here's hoping no one gives me any more languages to consider!

Chris

savantcreative
02-04-2011, 01:16 PM
Actually that is very similar to what I have been learning. php is more granular but Ruby is quicker to develop with.

bcarl314
02-10-2011, 07:06 PM
As said before in this thread, comparing a programming language to a framework is comparing apples to oranges.

CakePHP is the base comparison to Ruby on Rails (in fact, cakePHP founders say they developed it to be a direct port of RoR to PHP).

So, that said, any framework will have advantages over the straight programming language because common tasks (such as Database interfaction, templating, mail, etc) are already created in modules for you to implement. However, it also results in several unknown limitations that you need to be aware of. CakePHP and RoR both use ORM, and if you're not careful in how you implement something, you can end up using a lot (A LOT) of extra memory in your application that you don't need to, or end up with nested foreach loops that slow your entire app down.

To me, CakePHP = RoR. I haven't seen any benefit of one over the other. To me, the biggest issue is finding support / hosts that support RoR and actually know what they're doing.

savantcreative
05-28-2011, 03:20 PM
Are there any ROR hosting companies that you think are good?
Thanks

Jethro
05-31-2011, 03:57 AM
I'm going through this decision making process myself. I haven't programmed for 15 years and have set myself a goal of developing a web application which earns more than 500 per month.

I've been research development technologies and am overwhelmed by the number of options.

The main thing I've found is getting unbiased comments on either PHP or Ruby on Rails is near to impossible. Most people out their seem blindly loyal to one or the other.

On first impressions it's clear that PHP is much rawer. You are able to carefully control everything and do things very well or very badly.

Ruby on Rails seems to offer a much faster development cycle due to it being a framework but you are slightly further removed from full control.

To me both have merits and I am investigating both for a while before deciding on which technology to go with.

Here's hoping no one gives me any more languages to consider!

Chris

Chris if planning on selling licences to use your application then php would be the obvious choice as there's far more hosting companies/existing sites using that technology. If planning on offering a service then ROR could be the better choice as it's a rapid development environment.

This of course doesn't take into account asp.net, coldfusion, or the myriad other options available to you.

Shinki
07-13-2011, 11:28 AM
I think these two sites are help you please find your answer hear

http://www.prospotlight.com/pro/webdeveloper/website/ruby-on-rails-vs-php.html http://www.oreillynet.com/ruby/blog/2007/01/php_vs_ruby_on_rails_an_evolu.html

jbibbs
08-13-2011, 01:17 AM
I know this is older, but since it still comes up on Google, I'll weigh in.

If your interest in programming is in being able to build dynamic websites, and you are or plan on being a freelancer, then you want to go with PHP.

PHP runs EVERYWHERE. It's installed EVERYWHERE. There are tons of applications out there to learn from, tons of developers to ask questions to, and in general it is just a hugely popular web programming language. All of the major open source CMS all run on PHP (Drupal, Wordpress, Joomla) so as a freelancer or someone who is thinking of getting in to making websites, you will NEED to know PHP. It will come up. Period.

However, if your desire is to develop custom web-APPLICATIONS (i.e. not just websites), and if you like building tools and frameworks, and your desire is to work in a boutique agency with other like minded individuals then go with Ruby.

Ruby is more than just web programming. You can write scripts to automate your whole server like Python or Perl. It just happens to have a decent framework for Web with Ruby on Rails. Ruby is best learned slow, when you can take the time to REALLY learn the language.

I've been out of school for 3 years, and I am loving Ruby more and more, but most of my living is made with PHP.

Hope that helps someone.


Best Ruby Guide Ever: http://mislav.uniqpath.com/poignant-guide/book/

fthomas137
08-13-2011, 06:47 AM
Have to agree with the poster above PHP is everywhere and Ruby, well is cool.

mark1976
08-20-2011, 08:47 AM
Are there any good CMS framework written using Ruby ?

illbzo1
12-10-2011, 10:40 PM
Are there any good CMS framework written using Ruby ?

Refinery (http://refinerycms.com/) was written with Ruby. Haven't used it myself, but I've heard good things about it.

To answer the original question, Ruby and PHP are used for more or less the same kind of programming, but Ruby is faster to develop with. I'd recommend doing a few basic tutorials for both languages and sticking with the one you find more interesting.

Also bear in mind I'm answering this question as a Rubyist, so I may be a bit biased.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum