Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

General Discussion

Jeremy Coleman
Jeremy Coleman
5,449 Points

Ruby Or PHP?

Currently I am learning JavaScript, but looking to do back end after I "master" it or rather get to a decent point.

However I am looking between PHP and Ruby and I am not sure which I should go for. I just know I want to learn a back end language so looking for a tip which direction I should go.

A bit more of my situation is I am looking to be a free lancer and maybe start a firm later down the road. So nothing will be long term, currently.

3 Answers

Kevin Korte
Kevin Korte
28,135 Points

Why not learn both? Go through the basics of each, and than decide. I started with PHP because of Wordpress, and it was easier to find entry level PHP tutorials.

Ruby (and Rails) scared me at first. I got a pretty solid footing in PHP, and than decided that the Ruby monster was a bit more of a teddy bear than a monster. I'm 90 days into serious Ruby on Rails work and am really enjoying it. That's after a year of playing with PHP. However, the only thing I really like more about Ruby is the syntax, it's a bit cleaner.

With that said, it's so clean I tend to get hung up on a few things still (like hashes) where PHP is a bit more vocal and clear to me what is what.

All that to say, learn both (spend 30-60 days on each), than decide. You'll be happy you did.

Jeremy Coleman
Jeremy Coleman
5,449 Points

I will give both a shot, I am looking for what's going to be more worth the time. All I see myself doing is making forms, perhaps other things as well. I just don't see what else I'd be doing with them since I am headed in the front end direction. Just wanting to add more "ammo" to the "arsenal".

Kevin Korte
Kevin Korte
28,135 Points

They are more or less the same tool. They are both hammers. In other words, both can do forms, both have great frameworks available (PHP => Laravel, Ruby => Rails).

It's probably going to be easier overall, and possibly cheaper to use PHP. I think just about every web host has PHP installed, however not every host has Ruby ready to go.

Ricky Catron
Ricky Catron
13,023 Points

Why learn something new when you don't have to? I would say use JavaScript for the back-end with Node.js. Back-end programming has a ton of new concepts and ways of thinking about programming at you will already need to learn, why throw another language into it too? I would recommend sticking with whatcha know and then when you understand the concepts then try out a new language to see what you like best. Why force yourself to learn new principles and new languages all at once?

Goodluck! --Ricky

Jeremy Coleman
Jeremy Coleman
5,449 Points

That's a good point, I didn't really look at JavaScript as a back end language as I was with PHP or Ruby. I'll look into Node.js thank you for that! Saved a lot of time for me as far as the now is concerned!!