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
Majid Mokhtari
10,506 PointsPython for web development?
I started learning Python since last week and I really enjoy this language and it seems much simpler comparing to Php or ruby! I dont know if it is me or everybody has the same opinion! but my question is since I need to put my focus on one or two back-end languages, Is Python a powerful language for web developing? comparing to other back-end languages like Php or Ruby on the rail?
3 Answers
John Steer-Fowler
Courses Plus Student 11,734 PointsBefore I start, this is 100% my own opinion on these languages so don't take it as a definitive answer.
- I prefer Python and Ruby over PHP for making web apps. They are easier to read, powerful and faster to code.
- I love Python as a language, but I personally prefer Ruby for making web apps because I like Ruby on Rails more than Python frameworks like Django.
But to actually answer your question. Yes, Python is a very powerful language for web development. It is being used by some of the biggest tech companies in the world and scales very well. It is also a very widely accepted language, and many companies will hire Python developers.
If you are worried about learning Python and not another language, I wouldn't worry too much. Once you learn one of these object-orientated languages, it is fairly easy to pick up the other, and each is as powerful and as useful as the other.
I hope this helps a little, but remember this is just my opinion. Some people swear by PHP, although I personally think that the newer languages of Ruby and Python are taking over with large scale web apps and frameworks.
Also, check out this blog post on reasons to move to Python from PHP.
EDIT: Facebook uses PHP, although it didn't scale exactly how they wanted, so they created their own language around PHP called Hack. When they made this language they actually added features that are similar to the scaling abilities of Python and Ruby to make it a more rounded language.
Chris Shaw
26,676 PointsHi Majid,
You're not the only one in that boat, I myself was very surprised at how easy it was to learn after putting it off for years. Before learning Python I had PHP under my belt which I think has a lot more power behind it because of it's more robust function library but Python would be just as good for creating small applications and/or API's that don't require a large code base and something simple like SQLite.
I have also started learning Ruby and Rails and am finding that a little hard but in terms of it's power compared to PHP and Python it sits closer to PHP because of it's built in function library, I guess someone who might be good to ask is Jim Hoskins as I remember watching him and Nick Pettit when they hosted DOCTYPE years ago and Ruby seemed like a perfect choice simply because it was so easy to integrate with front end development.
I would say have at least 2 languages under your belt and just keep messing around with them as I will be doing but I think in the end I might be making a swift transition to Ruby because of how much nicer the code base is and working with front end assets is.
Majid Mokhtari
10,506 PointsThank You! it was very helpful
Chris Shaw
26,676 PointsYour welcome
Chris Shaw
26,676 PointsChris Shaw
26,676 PointsNice link John, I will read it on way home tonight.
Kenneth Love
Treehouse Guest TeacherKenneth Love
Treehouse Guest TeacherFacebook uses pretty much everything. I went there to teach them Django in early 2014. They've started using more Python and Django since acquiring Instagram.
John Steer-Fowler
Courses Plus Student 11,734 PointsJohn Steer-Fowler
Courses Plus Student 11,734 PointsNice piece of information, thanks Kenneth Love!