News for hackers. Stuff that matters.
Re:JavaScript hydration is a workaround, not a solution by cxr on Thursday September 01, 2022 @01:31PM (#32679936)
You can do this directly in the browser* without JS—in exactly the way shown by the example I just gave: by using a browser that is capable of editing and sharing docs (directly).

* If someone really wanted to be a stickler, they could point out that that you've set up Google Docs to fail your own rubric, since it involves indirect editing. The browser itself has no direct role in the editing process. It only manages to do so by fetching and executing the minified bundle on the Docs site.

Re:JavaScript hydration is a workaround, not a solution by trs8080 on Thursday September 01, 2022 @02:53PM (#32681223)
So your solution is to write a browser so you don't have to write JS?

Supposing I just want to create an internal tool that allows me to collaborate in realtime with my colleagues on a document (multiple cursors, everyone editing at once) and I have to do it in an existing browser because I don't write C++ and only have a few weeks to deliver - how would I do this without JS? Also, it needs to work on Android, iOS, Windows, and macOS in FF, Chrome, and Safari.

Re:JavaScript hydration is a workaround, not a solution by cxr on Thursday September 01, 2022 @06:22PM (#32684154)
> So your solution is to write a browser

First, you're moving the goal posts...

> so you don't have to write JS

... and attacking a strawman. (No, I'm not worried that I might "have" to write JS. I've written a lot of JS. And I put a lot of effort making sure there was high quality documentation about the language in the early days of developer.mozilla.org—so that other people could have a nice time when they write JS.)

Secondly, you are aware—I'm certain of it—that the company behind Google Docs actually does have a browser.

Re:JavaScript hydration is a workaround, not a solution by gitgud on Thursday September 01, 2022 @11:40PM (#32686322)
> You can do this directly in the browser without JS—in exactly the way shown by the example I just gave: by using a browser that is capable of editing and sharing docs (directly).

So your users will need a specific browser to use your Web app?

This goes against a primary advantage of Web apps... They work on many different browsers/devices*

Re:JavaScript hydration is a workaround, not a solution by cxr on Friday September 09, 2022 @07:16AM (#32777819)
> So your users will need a specific browser to use your Web app?

No. For the use case mentioned (editing and sharing docs in Google Docs), no one would be using a Web app, because there isn't one anymore. With the browser itself able to do directly what Google Docs is being used for, there's nothing left.