5 ms·
I'd rephrase the question to be "Would Facebook be Facebook without PHP?"
by ecaron 13y ago
I'd rephrase the question to be "Would Facebook be Facebook without PHP?"
- thescrewdriver 13y agoI don't see why not. It's possible to have done it any any mainstream language.
- nbm 13y agoWhich mainstream language would you have chosen in 2003 that you think would have had similar success?
- maratd 13y ago> Which mainstream language would you have chosen in 2003 that you think would have had similar success? Bingo. In 2003 PHP was the best option to get from zero to hero.
- nobleach 13y agoAs much as I'm not a PHP fan these days, you are completely correct. In 2003, you had CFM (which MySpace actually used at first), Java (and probably some overly complex framework like Jakarta Struts to go with it), CGI, or the new ASP.net. For a college student to do a quick HTML doc with some code interspersed here and there, PHP sounds like the ONLY viable option that didn't have you spending money on licensing, or setting up some huge infrastructure. I used PHP/MySQL too as it was just dead simple for most things.
- gtirloni 13y agoAny. Really, any. Facebook is throwing a lot of engineering effort into fixing things that now matter to them, but didn't when they started (and were small). They could have picked Perl CGI's and it'd still have happened (perhaps Perl 6 would be a success these days). I don't think PHP has played any role in bringing FB to the size it is today (programming language does not translate to number of users signing up). So yes, any mainstream language available in 2003 would do it.
- thinkpad20 13y agoDo you think perl would have been much better? Either way, the point that he was making was that there were pretty slim pickings back then. Certainly the dominant languages/frameworks of WD these days (python, ruby, node) didn't exist. Or by another token, the only dominant one that was also strong back then is PHP, the one they chose.
- jurip 13y agoYeah, Node didn't exist. Python was over ten years old in 2003. In Python web development there had already been CGIs, mod_python and two major releases of Zope, with hope of Zope 3 on the horizon. Ruby is almost as old as Python.
- thinkpad20 13y agoI'm aware that they existed, but clearly they were very immature as compared to how they are now. PHP on the other hand was in it's heyday, and (clearly) fulfilled all of the needs of Zuckerberg and the other developers. A suggestion at the time that they use a language like ruby or python would probably never have been made, and for good reason - and it almost certainly wouldn't have been adopted. It's just not realistic to suggest that early FB had this vast array of choices for which language to use.
- elwell 13y agoI disagree. Perl would have likely crippled them, due primarily to the lack of Perl engineers.
- nbm 13y agoI believe Python might have worked. It's grown well as a web development language since then by itself. It may have forced several rewrites before WSGI came about. It is a relatively easy language to learn, to hire for, and has few massive warts. (Ruby is roughly in this category too, in my opinion.) I believe Perl probably would not have worked. It hasn't grown much as a web development language since then (although it has some great web frameworks). The language itself has languished in both development and community growth, and it fairly esoteric and certainly harder to learn than Python and PHP, and would have been harder to hire for. It seems unlikely that pre-2010 Facebook to meaningfully have changed the trajectory of the language (ie, Perl 6 being a success). I don't think Java, C++ (or C), Cold Fusion, ASP, Haskell, Ocaml, and many other languages would have worked, for a bunch of reasons. Harder to hire for, harder to iterate with, more costly in terms of infrastructure, harder to teach/learn, and so forth. PHP isn't a totally insignificant part of Facebook being as successful as it has been. A good-enough language choice was necessary, at least, and PHP it seems was a good-enough choice.
- nnq 13y agoPython and mod_python were available and working back then. The mysqldb python module too I think. Guess somebody just didn't like python :)
- Crito 13y agoEngineering decisions made in 2003 need not dictate the future of the company more than a decade later. Keep the systems that are written in PHP around for their nature life. Write new systems in whatever is more sensible at the time. Lazy-load your way out of shitsville. Of course this is vastly complicated if they been neglecting modularity and SOA for the past decade and most of facebook is still a monolith.....
- nbm 13y agoPretty much only the front-end code is written in PHP (or Hack, I guess). Services (things like the feed, the typeahead, graph search, messages, &c.) are written in C++ and other languages - ie, the things it is sensible to write them in...
- Crito 13y agoWell that is good to hear at least. Do you know if Facebook is still trying to operate out of a single mercurial repository? Or is that only for the front-end code with services having their own repositories?
- bad_user 13y agoI got my first job in 2003 and it involved PHP development. I remember well the state of affairs then. Yes, PHP was the most pragmatic option for getting things out the door in those days. Beginners getting started today don't know how lucky they are in terms of tools, languages, libraries, communities and documentation available.