Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

Facebook is heavily JavaScript based. Why doesn't it rely on jQuery (or any other similar library)?

Edit: Why close this question? this isn't subjective. facebook doesn't use jQuery (or any other framework) for a reason, that i am asking for.

like image 529
dynamic Avatar asked Mar 26 '11 20:03

dynamic


People also ask

Does Facebook use jQuery?

facebook doesn't use jQuery (or any other framework) for a reason, that i am asking for. This is pretty subjective by nature.

Why people are not using jQuery?

DOM manipulation was not straight forward, thanks to jQuery developers can manipulate with little effort. Today all browsers in use today support document. querySelectorAll, which accepts a CSS selector and returns a list of matching nodes. In many ways thanks to jQuery, jQuery itself is no longer needed.

Is jQuery discontinued?

The team announced that the cross-platform jQuery Mobile project under its umbrella will be fully deprecated as of October 7, 2021. New technologies for mobile app development have evolved since this project was launched in 2010, so we're encouraging developers to plan for this jQuery Mobile transition.

Why does Facebook use JavaScript?

this allows them to render pages extremely fast. They just load some javascript to render everything on the screen and then load the rest.


2 Answers

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.

like image 180
selbie Avatar answered Sep 22 '22 12:09

selbie


Because they choose to do their own thing?

like image 44
Jared Farrish Avatar answered Sep 19 '22 12:09

Jared Farrish