SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Jan 2008
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Learn Ruby on Rails or learn PHP and why?

    Hello

    Learn Ruby on Rails or learn PHP and why?

    Thank you

  2. #2
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,751
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, you're in the ruby forums, so most of the responses will be somewhat biased :P. I look at it this way:

    PHP tends to be easier to learn. It's not as object based as Ruby, but it does support classes. However, you have to work a lot harder at creating quality code, because PHP lets you get away with a lot more than Ruby would.

    Ruby on Rails on the other hand is a bit more difficult to swallow if you have no object oriented background, or any concept of things like MVC (Model View Controller). However, if you push through with it the whole way, I think the end result will be good in the long run into creating high quality and organized code.

    Either way, no matter which one you decide to go with, you're going to need to be critical of the information out there. Verify who wrote it, why you should believe them, and how many people disagree with their viewpoint and why.

    My final advice, which one to learn? Both. Singling out a language out is, in my opinion, a bad idea. The more you know, the better off you are in general in picking up new languages, and new concepts. Languages often have a set of core concepts with alterations to help with specific needs. For example, perl has common things like classes, packages, system execution, sockets programming, etc. However, it has a real strength in doing anything requiring parsing.

    Not restricting yourself and learning as many concepts as you can from languages is a great way to improve oneself as a programmer.

  3. #3
    SitePoint Enthusiast AllTom's Avatar
    Join Date
    Feb 2008
    Location
    Wherever danger lies...
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It seems like you are new to programming web sites, so I would recommend starting with PHP. Coding a few web sites in a minimalistic way (without templating libraries like Smarty and using database functions directly, without worrying about the abstraction layers) is a great way to find your way around the language and get a feel for what coding is like in a safe environment. I believe it's also necessary to understanding why the abstractions like PEAR and Rails exist and are good things.

    With PHP it is also much easier to find a server to run your site on, since every cheap hosting provider supports PHP and few support Rails.

  4. #4
    SitePoint Evangelist ikeo's Avatar
    Join Date
    Oct 2004
    Location
    Austin Texas
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Start out with PHP ... its easier. When you've done web development in PHP, it will help you appreciate ROR more when you get around to using it.

  5. #5
    SitePoint Member vSkyfluxx's Avatar
    Join Date
    Mar 2006
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I agree with AllTom and ikeo, learning the basics of PHP will help you appreciate the wonderful abstractions of Rails.
    "Earth smiles in flowers" - Ralph Waldo Emerson
    DuskDesigns

  6. #6
    SitePoint Enthusiast jeffbax's Avatar
    Join Date
    Jun 2003
    Location
    New Jersey
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If this is your first experience with a scripting language, I suppose it might be easy to start with PHP. That said, learning Rails will give you greater appreciation for fully object oriented coding, and the Model-View-Controller development mentality that most professional work adheres to.

  7. #7
    SitePoint Member
    Join Date
    Mar 2008
    Location
    Jerusalem
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by abdo View Post
    Hello

    Learn Ruby on Rails or learn PHP and why?

    Thank you
    This is like asking whom should I get married to? X or Y, and why?

    Get married with both of them is an interesting answer

    The point is: only you can answer this for your self.

    How?

    Give this book a day or two, and you will know and feel.
    http://pine.fm/LearnToProgram/?Chapter=00
    (This tutorial assumes no present programming knowledge.)

    good luck

  8. #8
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ruby and PHP are programming languages, Rails is a web development framework for Ruby. You can think of Rails as and add-on for Ruby that helps you develop web applications. Web development is much quicker with Rails but you need to learn how to use the add-on. That's why I recommend to learn Ruby or PHP first, before attempting to learn how to use Rails. Obivously it's better to learn Ruby if you're going to use Rails, because Rails is an add-on for Ruby, not for PHP.

    There are add-ons for PHP too. If you want to use an add-on for PHP then I recommend that you learn PHP.


Bookmarks

Posting Permissions

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