Hello
Learn Ruby on Rails or learn PHP and why?![]()
Thank you
| SitePoint Sponsor |
Hello
Learn Ruby on Rails or learn PHP and why?![]()
Thank you





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.
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.



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.
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
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.
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




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