Ruby on rails or PHP?

Discussion in 'Web Design and Development' started by gizabo, Apr 4, 2009.

  1. gizabo macrumors regular

    Joined:
    Jul 20, 2008
    #1
    What do you think is better... RoR or PHP?

    And what do you think will be more dominant in the future?


    I think RoR is much better... Much easier to use and does the boring work for you...

    But, i think PHP will remain dominant in the market...
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    I think it depends on what you want to do with the languages. Ruby on Rails has a more specific area that it targets, whereas PHP is broader in functionality. It's not really about dominance, just the right tool for the right job. I mostly use PHP, but will still likely continue to play with Rails.
     
  3. nborders macrumors newbie

    Joined:
    Nov 2, 2005
    #3
    Not a big fan of RoR

    I took 07 to study up on RoR. I'm happy I did, for the personal challenge. However, I rarely use it, and have lost most of my skills. That says about all of it for RoR for me. I honestly, wish I had spent that time learning other skills, like Flex (MXML/ActionScript3) or even more advanced PHP.

    The advertising on RoR was not as easy as they make it sound.

    That said, RoR can be powerful MVC application. I don't want to crap on it too much.

    PHP will open up more of a world to you. If you build modules in Drupal, or tweak a plugin in WordPress you need PHP.

    Then on top of it, PHPCake does most of the same as Rails.

    So I would stick with PHP. Learn it. Know it. Live it.

    Hope that helps.

    ~n
     
  4. sbauer macrumors member

    Joined:
    Feb 7, 2009
    Location:
    Baltimore, MD
    #4
    I use Rails. Ruby is a much cleaner/better language than PHP.
     
  5. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #5
    For the sake of the thread can you elaborate why you feel this way?
     
  6. haravikk macrumors 65816

    Joined:
    May 1, 2005
    #6
    I've not used Ruby on Rails for much serious work, but it is definitely a much cleaner language than PHP.

    The thing I dislike most about PHP is the sheer mess that is its functions library; function names and parameter orders are inconsistent, and due to the fact that PHP is late to the scene with object-oriented constructs it is just generally horrible; for-example, in RoR you have "a string".split(/,/), whereas in PHP you have explode(',', "a string"), in RoR you have "a string".capitalize(), in PHP you'd have to do str_to_upper("a string"), you have to either memorise, or constantly look-up tons of different functions, rather than just calling appropriate functions as member-functions/methods, it's very messy!

    Really I would have expected the PHP creators to have released a version that has proper object-oriented libraries etc. by now, with the same basic features, possibly with some way of distinguishing between current code and a new cleaner syntax/library while running them side-by-side.

    PHP currently has the main advantage that it's been around for so long that it has a really-rich feature-set, which I believe Ruby on Rails is lacking; not say it's crippled in any-way, but PHP has many ways to solve different problems.

    On the issue though, is there a preferred editor for use with Ruby On Rails? The thing that puts me off using it any more is the use of command-line to interact with it, really I'd rather use a tool that does that stuff for me; with PHP all you need is a text-editor :)
     
  7. sbauer macrumors member

    Joined:
    Feb 7, 2009
    Location:
    Baltimore, MD
    #7
    Basically everything haravikk said.

    I just dislike some of the design decisions that were made. I don't like the special methods prefixed with __ . Naming conventions are non existent in some cases. I understand why they implemented namespaces the way they did, but it just isn't clean.

    Ruby just makes sense to me.
     
  8. Malfoy macrumors 6502a

    Malfoy

    Joined:
    Nov 1, 2005
    #8
    I considered getting into RoR but for the reason angelwatt described i opted to say with PHP. This year I plan to get into flex/as3 because I have some ideas and I like what they are doing with it.
     
  9. nborders macrumors newbie

    Joined:
    Nov 2, 2005
    #9
    Hands down. TextMate.

    ~n
     
  10. sbauer macrumors member

    Joined:
    Feb 7, 2009
    Location:
    Baltimore, MD
    #10
    Agreed. Throw in the Ruby on Rails bundle and you're good to go.
     
  11. davecuse macrumors 6502

    davecuse

    Joined:
    Feb 20, 2004
    Location:
    NYC
    #11
    These two aren't really comparable. PHP is a language just as Ruby is, the real power of Ruby on Rails comes from the Rails framework. If you're sold on PHP you could use a framework like Cake.

    To me the real value of Ruby on Rails is in the community, there are so many smart people posting their ideas and code that you'd have a tough time not being able to find a quick solution to whatever problem you're having with a quick Google search.

    I've been developing professionally for Ruby on Rails for the past 5 years, and haven't once looked back and wished I'd spent more time learning PHP.
     
  12. macDonalds macrumors 6502

    Joined:
    Jun 8, 2007
    #12
    I see the future like this:

    1.) PHP will continue to pull in newbs (I mean that in the nicest way possible) as its barrier to entry is extremely low.
    2.) Ruby on Rails will continue to take devs from the cream of the crops of PHP and [insert framework here], and other web languages/platforms.

    See the difference?

    Both have pros and cons that we can go on for days about. The bottom line though is that PHP was released many, many, many moons ago and is playing catchup in areas such as OOP, MVC, TDD, etc. Granted, all of the PHP frameworks out there help to close the gap but Ruby on Rails is a MODERN language and framework, built from the ground up to support today's web needs.

    With that being said - PHP and [insert framework here] is perfectly fine too... if you're coming from another language. I stress coming from another language, because I would say far away from PHP as a first language. You'll be better off learning something OOP first and even better if it's not a dynamically typed language. C#, VB.NET, or JAVA are good choices.
     
  13. fivepoint macrumors 65816

    fivepoint

    Joined:
    Sep 28, 2007
    Location:
    IOWA
    #13
    This thread is so close to a project I'm working on... I'm currently in the process of deciding what language (and what company) to use to help me build a web 2.0 user-content generated website (forums, blogs, news, reviews, gallery) that I've been planning for quite some time. Unfortunately, it seems that no one where I live uses either one of these languages! They use things like Cold Fusion and .Net.

    If you get a second, please read my thread below, and help me out if you can! I'm so excited to get started, but I need someone smart, informed, to help me better understand what I should do next!

    Thanks so much!

    http://forums.macrumors.com/showthread.php?t=563757
     
  14. fab5freddy macrumors 65816

    fab5freddy

    Joined:
    Jan 21, 2007
    Location:
    Heaven or Hell
    #14
    I'm in the same boat !
    I am about to start learning a web scripting language,
    and want to choose between Ruby on Rails and PHP .......

    Which one is easier to start with ?

    all i know now is HTML and a little CSS.
     
  15. macDonalds macrumors 6502

    Joined:
    Jun 8, 2007
    #15
    Easier? PHP.
     

Share This Page