1. 7
  1.  

  2. 6

    On CryptpPad we chose not to use any kind of framework for mostly similar reasons. For us there is a realtime editing loop which must be fully synchronous otherwise a keystroke can slip in between read and write of the DOM which will cause lost characters. Furthermore we didn’t find any framework which seemed like it would last long enough and be flexible enough for our needs.

    We ended up using only vanilla javascript ES5 (no compiling) and requirejs which allows us to serve almost entirely immutable content with 1 year cache headers and the js which is in your browser is exactly what we wrote, even with the comments.

    1. 2

      The article touches on exactly why you have to use a framework…the application supports Firefox and Chrome, but not Edge or Safari. Browsers other than Firefox and Chrome make up something like 30% of the browser market share. Leaving 30% of your potential customer base on the table might make sense in this case, but I don’t think it’s viable for most applications.

      The deal with frameworks is that they smooth over the cross-browser compatibility issues for you. Sure you can write your own compatibility layer, but that gets real expensive real quick.

      1. 3

        Are there any frameworks that allow you to use webRTC on all browsers though? Because they stated that webRTC was the main reason they were not supporting edge and safari.

        1. 3

          From the article:

          We also found that the vast majority of our users (95% of those surveyed) were happy to use Chrome if it “delivered a superior video conferencing experience.”

          Remember, real engineering includes finding out how much your users will put up with. It can be a lot more than you think. Caniuse helps a lot in the other set of cases. :)

          1. 3

            “How bad can we make it?” :)

          2. 2

            OTOH even with a framework, testing costs alone might make more than one or two browsers and versions impractical. In some cases it’s not unreasonable to specify which are supported and which are not.

            1. 2

              What is the characteristic that frameworks have that helps cross-browser compatibility? The title says “Why we didn’t use a framework”, not “why we didn’t use third-party code”. Certainly frameworks have to concern themselves with, but so do libraries. The choice is between frameworks or libraries not between frameworks and write everything from scratch.

              Personally I favor libraries over frameworks.