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

Lewis Turner
Lewis Turner
10,930 Points

PHP vs Python vs Ruby - Help!

Hi :o)

I am most of the way through the 'Front End Wed Development' track and am starting to think about where to go from here. My main objective is to create a web application (hence the HTML, CSS and JS on the 'Front End Web Development' track) that will interact with the user, as well as a database (to store and retrieve user input) and call external web services. My basic question is: with my objective in mind, should I learn PHP, Ruby or Python?

Before I started my current track, I did spend a couple of days on the Python Basics tutorial, so I do understand how simple Python is to use (a big plus point!), however the basics course really focus's on the syntax and basic programming techniques (variables, if/else, loops, datatypes etc..) I didn't get far enough in to start looking at the web frameworks (flask/django).

So, what do people think? Does any one out of PHP, Python or Ruby particularly suit what I am aiming to achieve? From other research, it looks like they all support Database and Web Service integration (although feel free to strike me down if I m wrong about that with any particular one!). Any input would be greatly appreciated :o)

A futher bit of research is also telling me that I can just learn JS Full Stack, and that will cover all of my needs?

Thanks!

Lewis

5 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

In my opinion, it depends on how quickly you want to start adding code to your webpages. If you want to start right now, I'd suggest the PHP track here at Treehouse. You'll be adding code in the first few videos. But like yourself, I haven't gotten far enough in Python or Ruby to say how easy/hard the web service part of those languages are. Just my two cents worth :)

jason chan
jason chan
31,009 Points

Python is hardest class here. Mr Kenneth is a Python GOD.

Michael Hulet
Michael Hulet
47,912 Points

All 3 will do what you want to, so it's really a matter of which language you like best. Thus, you should really try each one and choose for yourself. That being said, I've tried all 3, and my personal favorite is Python. If you don't like Python, I'd try Ruby next

It might be worth mentioning that if you plan on using Wordpress as an accent to your Front-End skills, Wordpress is written in PHP. I've seen many jobs that specifically ask for WP skills, and if you know "what's under the hood" of WP, I'm sure that would be seen as valuable. So my vote is PHP if you want to go down the WP path.

Lewis Turner
Lewis Turner
10,930 Points

Thanks for your input guys.

I'm still torn between PHP and Python. I like the idea of PHP because (based on my research) it is specifically designed for web development; which is what I am really looking for. However, Python seems to offer more frameworks for things like graphing (and lots more), which could be really useful. I'm also told that python is more secure than PHP and it is formatted well, which makes it easy to read (based on my small experience with python, I agree).

I still have a couple of weeks until I get to the server side of things, so any more input would be appreciated. I will have a lot more googling time too :o)

I prefer Python because of the syntax and how multi-purpose it is. You may be doing web development now, but if you want to transition your skills, Python is applicable to many other fields as well. I am a fan of how databases work (at least with Peewee), and Flask is super simple but powerful. I have yet to learn Django, but it powers YouTube, Google, Reddit, and lots of other sites, so that is a plus.

WordPress is powered by PHP, so if you're interested in working with it you may need PHP skills for more advanced things.

The fact that PHP was designed specifically for web development also has a downside, though. There are lots of scripts and libraries that are made in Python, but for something other than web development. If you wanted to use those scripts/libraries in your web app, you could use them seamlessly. That's one of my favorite advantages.

If you can, try to learn both! More experience is always better.

Happy coding!