Why doesn't facebook use jQuery (or similar)? [closed] Why doesn't facebook use jQuery (or similar)? [closed] jquery jquery

Why doesn't facebook use jQuery (or similar)? [closed]


Short answer: You'll have to ask the Facebook development team.

Best guesses:

  1. Large companies with large software products (and mature code bases) tend to stick with what works - even when there is a popular framework already out there that is compelling to move to. Remember, Facebook was around long before JQuery was considered standard.

  2. They likely will be supporting their existing code for many more years to come. And the benefit to cost ratio of making a "switch" to a new language or framework may be too low to warrant a re-write or a transition. Case in point: Sun didn't port much of Solaris to Java. Only a marginal amount of Windows is written in C#.

  3. In the year 2011 when I first wrote this: if you actually look at Facebook's website, their DOM structure isn't that complex. They don't have very many animations. They aren't a very heavy AJAX site. Given that, JQuery may not be compelling for them. Update - In 2015: FB is much more dynamic than it was years ago. So #3 here doesn't hold the same weight as it did in 2011.

  4. Also, when you have multiple teams contributing to a single software product (or web site), it's important that everyone standardize on the same framework. If every team integrated with a different framework, then the code becomes bloated quickly with linkage of all these different libraries. In the case of a website, this means longer page load times.

  5. JQuery is designed to support the largest set of browsers. In some cases, this might mean "optimizing for the lowest common denominator". FB may want to take advantage of newer browser features when available.

  6. FB may not want to get too "locked in" to JQuery. JQuery was known to have a few bugs with some of the newer browsers that were in beta. Now if Facebook has a million lines of code based on JQuery 1.6, it might be buggy when run on IE 10, FF 5, and Chrome 12 near year. To make this work, they would have to upgrade to JQuery 1.7, but that means a huge amount of testing across their entire code base.

  7. Finally, they may have something internal that works better than JQuery. I would not be surprised if Facebook already has a server-side framework that outputs HTML+JS based on the browser making the page request.

I recognize that none of these answers are very popular. What developer on your team doesn't want to switch to the latest and greatest technology? But when you think about the business case and cost of supporting a framework relative to the size of your business, you have to tread carefully.


Because they choose to do their own thing?


Facebook doesn't rely on libraries for the exact reason you stated, it is heavily javascript based. Because of this, they want full control and customization of the code that they write. This is so they can write solutions that are specific to their applications, which also allow for efficiency. Efficiency is a huge thing for all sites (and most definitely Facebook) and this way they can easily edit their code easily to perform to their likings.