Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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,148 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,148 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!!