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

JavaScript JavaScript Basics (Retired) Introducing JavaScript Your First JavaScript Program

I thought Google was powered by Python and Facebook by PHP, not JavaScript. What's the reality?

What runs Google and Facebook? I had heard it was Python and PHP respectively. Thank you.

5 Answers

It's important to distinguish a web app's front-end from its back-end. Facebook's back-end is built with a special version of PHP; Twitter's back-end was originally built with Ruby/Rails, but was converted to Java over the past year. Many of Google's applications (their back-ends, that is) are built with Python, YouTube included.

Those languages govern the application servers, not the browsers that connect to them. For any interactivity in the browser, JavaScript must be involved.

When someone says "Such-and-such an app was built with Rails," the term "Rails" applies only to the back-end. If they said "Such-and-such was built with Rails and Ember," then "Rails" applies to the back-end (as it is a backend framework), and "Ember" applies to the front-end (as it is a front-end/JavaScript framework).

Brandon Barrette
Brandon Barrette
20,485 Points

So websites are built using many different programming languages that all talk to each other.

Gmail for example uses a lot of javascript for interactivity. I'm not sure what they use server side. I do know Facebook is majority PHP on the server side and Twitter initially used Ruby.

The thing to remember is:

  • JavaScript is a client-side language, meaning it's run in your browser
  • Ruby, Python, PHP, etc are server-side languages, run on a server which generate the content and then it's sent to your browser to be displayed.

You can think of JavaScript as a dynamic way to change content that's already been rendered without having to reload a webpage. You can use AJAX to communicate with the server and return information to show to the user.

I found your response very useful, Brandon. Thanks!

Just wanted to add 2 links that I've found very helpful when asking how a site is built. Hope you enjoy!

http://behindthesite.com/#/ this is very detailed, provides references and you can learn and spend a lot of time here!

https://wappalyzer.com/ this is a browser extension/plug-in - and when you are visiting a site it will tell you what technologies are used. Very cool tool.

/travis

Awesome information! Thank you very much!

Stefan Osorio
Stefan Osorio
16,419 Points

"I don't kow for certain but I do believe that Sites like Twitter and Facebook are run on Ruby and of course PhP."

Well, you can build the backend of applications "like Twitter and Facebook" with pretty much every language that can run on a server. This can be PHP, Ruby, Java, Python, Javascript, Go, or a whole lot of other stuff. Most big sites run on pretty complex stacks (so it's not quite as easy as "Twitter runs on Java"), some even make their own tech (Facebook recently migrated most of it's codebase to it's own PHP implementation called "Hack")

Here's a nice overview of the languages used in some popular sites: http://en.wikipedia.org/wiki/Programming_languages_used_in_most_popular_websites

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,252 Points

I don't kow for certain but I do believe that Sites like Twitter and Facebook are run on Ruby and of course PhP.

I'm looking forward to getting in to Ruby as I hear it's a great platform for building dynamic websites. :-)

I would add that Ruby is really easy in my opinion. Like very very very compare to others, and clean.

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,252 Points

Nice.

It's on my to do list but i have a lot of material on Treehouse to get through. :-)

Same here, i left it and well, I'm into wordpress themes, so I'm going on PHP but for now just HTML and CSS ( perfection in a way). But as i started Ruby , its just seriously I'm sure you gonna like it .