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

Business

Andrew MNeyer
Andrew MNeyer
668 Points

Back End Developing

Besides PHP what would be a good language to use for a complex back end web app??

3 Answers

Ricky Catron
Ricky Catron
13,023 Points

Python! I love the language. It is simple and intuitive. With great frameworks like Flask, Bottle, or Pyramid for small sites and Django for large ones I can't think of a project I couldn't use Python for.

That said sometimes it is not the best choice. If you wanted a real time web app like a chat Node.js might be a better fit.

Ruby and Rails always needs a mention as it is used on an enormous amount of site including this one I believe.

Even Java can be used though I have no experience with that I have heard that Spring is an excellent framework.

Goodluck! --Ricky

Michael Bianchi
Michael Bianchi
2,488 Points

It comes down to preference a lot of the time. Java, if you don't specifically build it into your work, has some notable security flaws for back-end work in my opinion. And because of SQL injection techniques that hackers use, it is sometimes worth the notion to avoid PHP altogether when handling databases (although there are some secure programming practices that help but not too many beginner programmers know this).

Python is very dynamic and can build just about anything. It's also a very old language, which is good, because that means it has a large support community for you and your developers. Just about anyone you contract will know something about older languages, too.

From a business stand-point, go with what meets these criteria:

  1. How educated is your team (or yourself) on a certain language?
  2. Is the language or library you're using proprietary? (Do you have to pay licensing fees to someone?)
  3. Do you need to handle large amounts of data, securely, all the time? (Python, Java, MySQL/PHP)
  4. Do you need to handle small amounts of data, within the browser, very quickly? (Node.JS)
  5. Does your language offer scalability? (Can you easily expand from your chosen language's existing framework?).

I hope that adds some clarity to the wonderful explanation offered by Ricky.

Ricky Catron
Ricky Catron
13,023 Points

Thanks for the security comment! Can you explain a little more about the Java security issues? I am unfamiliar with using it for the web.

While PHPs mysql library does have some security flaws both PDO and MySQLi have easy ways to fix that. Filter input escape output. Learned that lesson the hard way but SQL injection is fun if you can practice it in a sandbox environment.

Python isn't really that old. 2.0 came out in 2000 (Yikes that was 15 years ago.... how does time fly like that).

The business statement is wonderful. I didn't even think of licensing fees.

Goodluck! --Ricky

Michael Bianchi
Michael Bianchi
2,488 Points

Ricky, the most common vessel for SQL injection is through PHP - as a result, it is heavily covered and there are plenty of known "patches" and better programming practices that are known. You're totally right though, and I should've said that - the right practices of input validation can pretty much remove the issues entirely.

But SQL injection can be done with Java too (really, most any server-side language). But Java may be more difficult to understand because it is not as widely used as PHP for server-side communications.

Some issues in Java 7 can allow for a programmer to completely bypass the sand-boxing features and then they can access the computer in a similar way that C or C++ can, including memory addresses, filesystems and networks. They're getting much better now. But not everybody has the latest versions of Java installed.

Far as my "business statement", that was my hard lesson too! I was building my own browser for weeks using Microsoft's .NET framework with Visual Studio Express. But the EULA and all their licensing nonsense pretty much said that I can't use their products to build software that competes with them (which is what I was trying to do, actually).

Now I have to learn an entirely new open source library and figure out how to get 20,000 lines of Visual Basic code and convert it into C++ code with the Dev C++ compiler instead of the Microsoft one. If I don't, and my software does well, Microsoft may very well sue me and shut it down. Very serious implications in that - try to use open source for your big, personal projects that you intend to earn money from.

Ricky Catron
Ricky Catron
13,023 Points

I definitely agree with you on PHP bad code makes bad security and vice versa. I did not know all of that about Java thank you for explaining it so well. I wish people would allow it to update to prevent breaches....

That must have been a tough lesson to learn! I prefer to always use open source as well. Thank you for such great explanations.

Goodluck! --Ricky