youtube / spfjs

A lightweight JS framework for fast navigation and page updates from YouTube
https://youtube.github.io/spfjs/
MIT License
2.23k stars 147 forks source link

Healthcheck #454

Closed brainkim closed 3 years ago

brainkim commented 5 years ago

Hi! I’m wondering if this library is still maintained/in use at youtube.

Signs that this library is unhealthy:

  1. Last release is 2.4.0 and was published 3 years ago.
  2. Primary maintainer (@nicksay) appears to have moved on.
  3. only ~8 downloads per week according to npm.
  4. The google group is overtaken with spam.
  5. Twitter account is dead.
PhilHarnish commented 5 years ago

Yes, SPF is used to serve a lot of traffic for youtube.com but I admit is a minority of the traffic. Most network requests on youtube.com use a data API which does not require the really powerful parts of SPF. @nicksay and other maintainers web team are still here and we would certainly accept pull requests which, for example, patch a security issue.

Ultimately the library is essentially feature complete for what YouTube needs it to do. SPF should still be relevant and stable for any project with the increasingly-niche requirement of serving raw HTML to SPAs. The "raw HTML" pattern is likely to wither away first. Of course, SPF does more than help with raw HTML (e.g. history management) but it lacks other features other libraries could offer (e.g. integration with client framework).

There has been some thought on whether we should build a new library like SPF but nothing concrete.

(Leaving this question open in case the project lead, @nicksay, wants to give an authoritative answer.)

brainkim commented 5 years ago

Thanks for the response.

Ultimately the library is essentially feature complete for what YouTube needs it to do.

This is an impressive accomplishment for the mutable world of web development!

…the increasingly-niche requirement of serving raw HTML to SPAs. The "raw HTML" pattern is likely to wither away first…

I’m curious, what’s the alternative that YouTube has come up with? What are the reasons that “raw HTML” is suboptimal, given that (I think) SPF.js handles the parsing and loading anyways?

PhilHarnish commented 5 years ago

Most requests on YouTube.com render using JS (Polymer) and a data API. Very little HTML is returned by our servers anymore. You can peek at how it works by looking at the network responses for requests with "pbj" in the URL and/or looking at the DOM data attribute for any "ytd-*" element.

We could have continued to use SPF for the networking, history, and peripheral benefits (e.g. manipulating document title or CSS in page) but the team decided to start from scratch.

brainkim commented 3 years ago

I think I got my response! Sad to see this library inactive and hope everyone is well. Closing for housekeeping purposes.