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

Torger Angeltveit
Torger Angeltveit
11,228 Points

What language is preferable when building social medias?

Hi, i am wondering if there is a language that is preferd when it comes to building social media.

I am already a little familiar with PHP but i see alot of social medias is built with ruby and python.

Basically im wondering if any of the language is easier to work with when building social medias? also, are mysql databases used when it comes to python and ruby or do they have their own database language?

6 Answers

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

im wondering if any of the language is easier to work with when building social medias?

Not really, we have

  • Facebook -- written in PHP
  • Twitter -- written in Ruby on Rails
  • Instagram -- written in Python/Django
  • Geeklist -- written in JavaScript/Node.js

Which stack is easier to work with depends entirely on your experience with them; the one you know and love will surely be easier to work with.

are mysql databases used when it comes to python and ruby or do they have their own database language?

These days, most social media sites were built with database stack in some combination of -- SQL, NoSQL, redis/memcached. And no, Python or Ruby doesn't have its own database language, what you're referring to is ORM http://en.wikipedia.org/wiki/Object-relational_mapping; instead of writing raw SQL code, ORM lets developer to write Python/Ruby/js code to query and manipulate database.

Torger Angeltveit
Torger Angeltveit
11,228 Points

Thank you, I appreciate your answer!

I think I will go with PHP then, since I already know a bit :)

Torger Angeltveit
Torger Angeltveit
11,228 Points

Not that much. I know the basics. if else, loops, alerts, prompt, functions, strings, arrays, etc..

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

When students are considering what backend languages to use, PHP, Ruby, Python are the usual choices; and they often overlook the potentials of JavaScript, I think that's a big mistake.

JavaScript is ubiquitous, it rules the largest platform on the history of computing -- the web browser. Whether people hates it or loves it, JavaScript is here to stay. As a developer, you just have to know JavaScript well, there's no two ways about it. And guess what, once you've learned JavaScript, you can build any site you have in mind by by leveraging the amazing MEAN stack, no need to learn yet another backend language.

Torger Angeltveit
Torger Angeltveit
11,228 Points

Interesting, i never thought of js as a full back end language. I dont know much about javascript atm, But does js and databases work the same way as PHP and MYSQL? Because i I find that way very appealing. Also do i work with and html forms the same way as with PHP?

William Li
William Li
Courses Plus Student 26,868 Points

js and databases work the same way as PHP and MYSQL?

Yeah, sorta. Only this time you replaced the PHP language with JavaScript.

the MEAN stack consisted of

  • Node.js a server-side platform, that enables you to write non-blocking JavaScript code on the server.
  • express a web framework, written in JavaScript; think of it as javasript equivalent to Ruby on Rails or Sinatra.
  • AngularJS a frontend JavaScript MVC framework.
  • MongoDB is a database that let you write query in JavaScript-like syntax.

So yeah, basically, MEAN stack let you write JavaScript from top to bottom; frontend to backend. You can check out this site MEAN.io. Nowadays, MEAN stack has a huge ecosystem, it is just as popular, if not more popular, as Rails or PHP; and JavaScript developer is in high-demand. SO i would strongly suggest you to check it out.

Torger Angeltveit
Torger Angeltveit
11,228 Points

Ok, thank you very much!

I will definitely check this out, alot of good suggestions.