Skip to main content

A perfect answer by someone, why FACEBOOK used PHP.


If someone like Mark Zuckerberg were creating Facebook today (2012 as I am writing this answer), sure, no doubt they would consider many other languages, frameworks, platforms, architectures.
It's impossible to say whether they would still choose PHP today if they were starting out. Other social-network companies are starting today, and clearly, some fraction of them are still choosing PHP. They may choose PHP because it does the job they need to do, and they know they can hire developers who know it and can be productive with it.
Facebook has obviously been very successful using PHP (even though at that time PHP 5.0.0 was still beta).  There's a strong argument to be made that writing viable software has little to do with the choice of language.  One can find anecdotes of successful projects or disastrous projects using any language.
According to the history described on the Wikipedia page for Facebook, Zuckerberg wrote the initial code for Facebook in October 2003. 
Consider what other web technologies might be considered, and whether they existed in 2003:
  • Ruby existed, but no Rails yet (1.0 was introduced in July 2004).
  • Java 1.4 with JSF 1.x or Spring 1.0.
  • Perl 5.8, but no Catalyst framework (it was introduced February 2005).
  • Python existed, but no Django framework (it was introduced in July 2005).
  • The term Ajax for web programming was coined in 2005, but the use of asynchronous XML requests was still nonstandard, too early to be used with for broad browser compatibility.
  • C# 1.0 and .NET 1.1 (C# 2.0 was introduced June 2006).
  • JavaScript existed, but no Node.js (it was developed in 2009) and no jQuery (it was introduced August 2006).
  • Amazon EC2 was released in August 2006.
  • Heroku was founded in 2007.
  • Go first appeared publicly in 2009.

The point is that Facebook's choice of PHP was perfectly reasonable for the time it was created.

Comments

Popular posts from this blog

PHP function for checking IMEI

Luhn algorithm for IMEI Check public function __checkIMEI($imei){ if(strlen($imei)==15){ $imeia=($imei[1]*2); if(strlen($imeia)==2){$imeia=str_split($imeia,1); $imeia=$imeia[0]+$imeia[1]; } $imeib=($imei[3]*2); if(strlen($imeib)==2){$imeib=str_split($imeib,1); $imeib=$imeib[0]+$imeib[1]; } $imeic=($imei[5]*2); if(strlen($imeic)==2){$imeic=str_split($imeic,1); $imeic=$imeic[0]+$imeic[1]; } $imeid=($imei[7]*2); if(strlen($imeid)==2){$imeid=str_split($imeid,1); $imeid=$imeid[0]+$imeid[1];} $imeie=($imei[9]*2); if(strlen($imeie)==2){$imeie=str_split($imeie,1); $imeie=$imeie[0]+$imeie[1]; } $imeif=($imei[11]*2); if(strlen($imeif)==2){$imeif=str_split($imeif,1); $imeif=$imeif[0]+$imeif[1]; } $imeig=($imei[13]*2); if(strlen($imeig)==2){$imeig=str_split($imeig,1); $imeig=$imeig[0]+$imeig[1]; } $IMEI= ($ime...

Magic Function in PHP (__sleep() and __wakeup() )

There are many magic methods in PHP like  __construct(), __destruct(), __callback(), __get(), __set(), __sleep(), __wake() and many more. But we will be takingon  on  __sleep() and  __wake(). __sleep() : serialize() checks if your class has a function with the magic name __sleep(). If so, that function is executed prior to any serialization. It can clean up the object and is supposed to return an array with the names of all variables of that object that should be serialized. If the method doesn't return anything then NULL is serialized and E_NOTICE is issued. serialize() is used for the representation of the storage class for storing the value. Serializing   an object means converting it to a byte stream representation that can be stored in a file. The use of __sleep()  to commit the pending task. If a bulk data is being inserted then at that time __sleep can be used. it will not release the object unless the work is not completed....

What are the effects of indexing on database tables?

The working of Index in database tables is the same as index work in a Text Book . It will help to browse the desired content faster in a book. we use to see the index on the first page then we check the page where it is in the book and then we directly come to that page, instead of going through all pages. Now databases , same happen with tables, if you are applying select query on the table, it will also check for the index and then return you the required field. It will return the field faster on which index is applied. Or in language, we can say that the index one query will execute faster instead of the non-indexed one. Join will execute faster on indexed one. eg- Consider a Table Product with `id` as Primary Key  id name price category_id  location_id                Table Info- Now  Applying Index on category_id  SELECT category_id FROM product WHERE category_id='5'; SELECT ca...