Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: Ruby vs. PHP

  1. #1
    New Coder
    Join Date
    Apr 2008
    Posts
    62
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Ruby vs. PHP

    Can anyone explain the differences between PHP and Ruby On Rails in terms of what can be done with them and ease of use?

  • #2
    New Coder
    Join Date
    Oct 2010
    Posts
    29
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Never took the time to learn Ruby, but this may help:

    http://blogs.computerworld.com/15460...vs_php_vs_ruby
    PHP - MySQL - JavaScript - AJAX - HTML/XHTML/XML - CSS - Java - C++

  • #3
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by jmace View Post
    Never took the time to learn Ruby, but this may help:

    http://blogs.computerworld.com/15460...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

  • Users who have thanked oesxyl for this post:

    [Paul Ferrie ] (01-13-2011)

  • #4
    New Coder
    Join Date
    Apr 2008
    Posts
    62
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by jmace View Post
    Never took the time to learn Ruby, but this may help:

    http://blogs.computerworld.com/15460...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.

  • #5
    New Coder
    Join Date
    May 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Flexible UK web hosting solutions for designers and developers
    PHP5, Ruby on Rails, MySQL, spam and virus filtering
    UK Hosting from Media72, Media72 on twitter

  • #6
    New Coder
    Join Date
    Apr 2008
    Posts
    62
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Is there any benefit in learning php first? Thanks

  • #7
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    Last edited by ShaneC; 02-04-2011 at 10:15 PM. Reason: Custom Signature Violation

  • #8
    New Coder
    Join Date
    Apr 2008
    Posts
    62
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Actually that is very similar to what I have been learning. php is more granular but Ruby is quicker to develop with.

  • #9
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    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.

  • #10
    New Coder
    Join Date
    Apr 2008
    Posts
    62
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Are there any ROR hosting companies that you think are good?
    Thanks

  • #11
    New Coder
    Join Date
    May 2011
    Location
    Australia
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by cmcc333 View Post
    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.

  • #12
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #13
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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/

  • #14
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Have to agree with the poster above PHP is everywhere and Ruby, well is cool.

  • #15
    New Coder
    Join Date
    Mar 2011
    Location
    Texas
    Posts
    22
    Thanks
    0
    Thanked 1 Time in 1 Post
    Are there any good CMS framework written using Ruby ?


  •  
    Page 1 of 2 12 LastLast

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •