Development and PHP13 Aug 2007 08:04 am

I recently read about how some of the source code behind Facebook was leaked. I read through some of it and as a PHP developer, it surprised me at some of the things that they have done.

Here is a small list of the features of their code:

  1. There is no object oriented code.
  2. There are a _lot_ of includes
  3. They use Smarty (or something built to feel like Smarty)
  4. They don’t use camelCase
  5. Many
    • Many
      • Many
        • Nested if’s

3 Responses to “Facebook Source Code Leaked”

  1. on 13 Aug 2007 at 10:20 pm Luke Hoersten

    Pre PHP5, people (at least where I used to work) used includes to kinda fake OOP. There was a definite need for OOP and I think they started development on facebook while PHP4 was still heavily used. You’d probably know better than me.

  2. on 13 Aug 2007 at 10:35 pm Daniel Tang

    Camel case is for chumps :(

    Facebook was founded before PHP5 existed, IIRC, because we were first semester freshmen. PHP5 was still very new when we were talking about it in EPICS sophomore year.

  3. on 14 Aug 2007 at 8:51 am Logan

    PHP 5 came out in July of 04, so Facebook most likely started before PHP 5.1 came out (the _first_ release of 5 worth looking at). That doesn’t mean that they couldn’t have looked at a few of the OO features of PHP 4 or even have migrated to PHP 5 by now (hell, they could be running php 4 code with a PHP 5 interpreter).

    With the support of PHP 4 going away at the end of the year, it’s hard for me to believe many people at all will be developing systems that use it.

Trackback this Post | Feed on comments to this Post

Leave a Reply

Buy fake rolex watch for sale replica watches replica rolex womens. Quality furniture furniture baby furniture.