1. 29
  1. 50

    I’m not suggesting that we give up React and es7 and go back to writing server-templated web-apps like it’s 2012 again

    ok. I’ll be the one to suggest going back to server templates. They’re low fat and gluten free, and come in all your favorite flavors. Try one today!

    1. 8

      The amazing thing is we managed to let a company whose application consists almost entirely of static content and buttons decide for us the best way to program rich and interactive web applications.

      1. 2


        1. 1

          Facebook I presume, since this in response to a comment about React.

      2. 1

        Phoenix Live View comes to mind. Maybe not usable for mobile much, but it felt like a breath of fresh air to me and at the same time can be quite low-latency from user’s perspective.

      3. 7

        There is no reason you have to use server side rendering with rails. My website uses rails to serve a json api to the frontend and I still get all the upsides listed on this post like devise and factorybot. I investigated using rust for the backend for speed reasons but after a few weeks trying it I went with rails because of how insanely fast it is to develop stuff with rails.

        At the end of the day I would rather have a finished project over a faster one that doesn’t exist.

        1. 3

          I never was a rails guy so this may be off target, but I thought the author was suggesting you still have to do more work to write a JS based UI that takes advantage of all the things that Rails can do on the backend. He wants something that has the same ease of use that server rendered Rails apparently had.

          1. 1

            Rails even has “api-only mode” and has webpack integration. It does not save you from burdens of GraphQL and complex state management in React, however. UJS is mostly failed thing. But backend things are still there and it’s still better than most node.js libs, at least if you don’t need cooperative multitasking for handling millions of idle connections.

          2. 6

            Author seems to live in a JS-bubble, which is admittedly a real thing but isn’t the only “modern” option. Plenty of companies use Rails or Django to serve APIs. The convention-over-configuration these two frameworks provide work great when you’re spitting out both HTML and JSON.

            1. 4

              Rails can be easily used with React and even Redux, you’ll gain the ability to handle the things Rails does well, like state persistence, authentication and authorization, routing, etc. With that setup you don’t have to do boilerplate stupid with React and can focus on what React is best for: templates.