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

PHP

PHP vs Rails

Which is better PHP or RoR? What are the similarities and differences between the two? What does PHP do?

3 Answers

Chris Howell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Chris Howell
Python Web Development Techdegree Graduate 49,702 Points

I can point you to a great article I read awhile back on the two. I remember when I used to wonder of these same questions, but this type of question can drive you crazy trying to find "the perfect answer" because there really isnt one. What you will come to find out is that, every language "has its place". Though you could build the same website or application with the any of languages, depending on what YOU are trying to accomplish for your end result, one language may be better "suited" for the job than another.

Basically each language has its benefits and each language has its own downfalls. A good thing to do is use the magic of Google and research popular applications or websites and see what language built them. So for example if the project you are working on has similarities to something like Facebook or Twitter, then I would look into those. Facebook was built using PHP, MySQL, C++ and some others. While Twitter started up using Rails but I believe I read an article about them having to switch to something that could scale with their users.

So the best answer I could actually give you for this, is research what you think would work best for what YOU want to do. Then try it out, try them all if you are able. Find a language you really enjoy.

First of all, PHP is a language while Rails is a framework. You can't really compare the two because of this, it's better to compare a MVC framework for PHP with Rails instead (such as Lavarel).

What was your experience with learning PHP on treehouse? What course of action do you recommend for a beginner on treehouse?

Chris Howell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Chris Howell
Python Web Development Techdegree Graduate 49,702 Points

Prior to Treehouse, I had very limited knowledge with working with PHP. A family member of mine asked me if I could possibly make a website for them. I eventually got to the point where I realized PHP was very necessary to make the pages dynamic. I found Treehouse and gave it a shot, I didn't feel places like YouTube were actually teaching me anything. The code was always basic, there was hardly any elaboration on topics that should definitely have more depth to them. When I did my first take at building the website, I thought I did a great job for the knowledge I had. Once I had gotten signed up for Treehouse I found my way into the Basics and that alone gave me better understanding of what was actually going on behind the scenes. At the time they did not have the intermediate or advanced courses, but when those were released I actually redesigned the entire site from scratch finding better ways to do it with what I learned. I like the teaching style they use here and the quiz/challenge reinforcement through each step of the way.

After finishing the intermediate/advanced courses when I did the redesign of the site i was building, I was actually able to understand and use the more powerful framework like CodeIgniter. It became really easy for ME to maintain the site, but the "client" (my family member) wanted the ability to make small updates. So I jumped into the WordPress section which is heavily based on PHP, so working with that was easy from the start. I went on to recreate the entire site using all my own custom WordPress theme/plugins. So I would say overall, quite successful and the time frame... well I have only been signed up here I believe I just passed 1 year. But PHP is not the only thing I have learned here.

Thanks for sharing your experience. it means a lot and encourages me. I know know that treehouse will teach me PHP