Slashdot Mirror


JavaScript and the Netflix User Interface

CowboyRobot writes Alex Liu is a senior UI engineer at Netflix and part of the core team leading the migration of Netflix.com to Node.js. He has an article at ACM's Queue in which he describes how JavaScript is used at Netflix. "With increasingly more application logic being shifted to the browser, developers have begun to push the boundaries of what JavaScript was originally intended for. Entire desktop applications are now being rebuilt entirely in JavaScript—the Google Docs office suite is one example. Such large applications require creative solutions to manage the complexity of loading the required JavaScript files and their dependencies. The problem can be compounded when introducing multivariate A/B testing, a concept that is at the core of the Netflix DNA. Multivariate testing introduces a number of problems that JavaScript cannot handle using native constructs, one of which is the focus of this article: managing conditional dependencies."

10 of 195 comments (clear)

  1. What browser apps need.. by dotwhynot · · Score: 5, Insightful

    ..is to not have a backspace ruin everything you just did just because you didn't have the focus you thought you had (Chrome!). And to work offline as good as online. Take email as an example. I really like using travel time to catch up on, reply to and delete email. But often travel time does not have internet access (train, plane). For now, email clients are superior to web email because of this.

    1. Re:What browser apps need.. by Georules · · Score: 4, Insightful

      Or maybe just unhook backspace from "Back in History". Who the hell actually uses backspace to go back in history on a website?

  2. Golden Hammer by Anonymous Coward · · Score: 5, Insightful

    It's unfortunate that Javascript has become the embodiment of the Golden Hammer in the programming world. And, just like a hammer made of gold, it doesn't even work that well as a hammer. It is only so widespread because when it comes to the web, it's the only tool you have.

  3. Why the hell... by beelsebob · · Score: 4, Insightful

    Why the hell are we still stuck using Javascript for the web? Why have we not got some virtual machine (not a language specific one like the JVM), that we can compile any language we like to? Half the world is trying to hack around javascript's shortcomings. If even half that effort was directed at making PNaCl viable on all browsers, we would be so much further forward.

    1. Re:Why the hell... by NotInHere · · Score: 4, Insightful

      First JVM is not language-specific: http://en.wikipedia.org/wiki/L...
      Second, javascript can be the compile target of LLVM bytecode. You can compile your favourite C program to js. See emscripten: https://github.com/kripken/ems...
      Third, javascript has a very fast but still backwards compatible bytecode like subset called asm.js: http://en.wikipedia.org/wiki/A...
      asm.js can be set as target for emscripten. The browsers supporting asm.js simply JIT it to bytecode, and those which don't still can run asm.js, but way slower.

    2. Re:Why the hell... by Intrepid+imaginaut · · Score: 4, Insightful

      It has a lot of merit, especially if you're trying to do anything fancy. Getting the needed processing power from the client, especially in this day and age of overpowered commodity hardware, rather than the server frees up the server to do more important jobs, and really as long as you're sanitising properly inputs why not. What's really needed is a proper push routine but that comes with its own tangled web of problems.

  4. Bytecode not Textcode by kervin · · Score: 3, Insightful

    Browsers should not standardize on a particular programming language, but rather on bytecode. But no one wants to use the other's Bytecode solution ( although we have sever great bytecode standards to choose from ) so we're stuck with Javascript.

  5. Re:Browser Apps are NOT desktop apps by StripedCow · · Score: 3, Insightful

    Lets stop pretending they are anything close.
    Google docs/sheets/whatever is a really crappy imitation of a full fledge office suite ...

    The real underlying reason these apps feel flimsy is probably that Javascript is a single-threaded language. It's like going back to the 80s.
    This means that when processing one action of the user (especially if it is a complicated action), the user interface will temporarily freeze.
    In this day and age, this is totally unacceptable.

    --
    If Pandora's box is destined to be opened, *I* want to be the one to open it.
  6. "Real piece of SW" for which platform? by tepples · · Score: 4, Insightful

    If you really need client-side processing, do a real piece of software for it.

    For which platform shall this "real piece of software" be developed? Windows (desktop), X11/Linux, OS X, Windows Phone, iOS, Android, Windows Store, or something else?

  7. Re:Browser Apps are NOT desktop apps by Fnord666 · · Score: 3, Insightful

    Oddly enough, that makes my point. That "problem" was solved ages ago. Why is that we've seemed to have collectively forgot old, but excellent, solutions to common problems?

    Because three week crash course dev school graduates won't have a clue what pre-emptive multitasking is.

    --
    'The tyrant will always find pretext for his tyranny.' - Aesop's Fables