News for hackers. Stuff that matters.
Re:JavaScript hydration is a workaround, not a solution by cxr on Thursday September 01, 2022 @11:45AM (#32678101)
> "Web fundamentals" can't give you Google Docs.

There's real irony in this statement, since you can't get much more fundamental than that. WorldWideWeb.app (Nexus) was created as a read-write client for both navigating and authoring content. Not only are modern Web apps not a necessary precondition for that, but neither JS nor any form of mobile code are necessary, either.

(The thing that Docs does wrong where "fundamentals" are concerned is its de-emphasis on the importance/role of the URL and making every Docs doc a sort of second-class publication that exists in this "other" kind of space—i.e., Google Drive and the Docs editor, which you always get a sense of being "inside", instead of the content just being out there on the Web.)

Re:JavaScript hydration is a workaround, not a solution by phailhaus on Thursday September 01, 2022 @12:38PM (#32678982)
People want to be able to author and share docs, directly in the browser and share with no effort. You cannot do this without JS, and the level of complexity is sufficient that you need robust tooling in order to manage it.
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.

Re:JavaScript hydration is a workaround, not a solution by grey-area on Thursday September 01, 2022 @02:10PM (#32680599)
<contenteditable
Re:JavaScript hydration is a workaround, not a solution by ItsTooMuch on Thursday September 01, 2022 @02:47PM (#32681148)
Sure. And now you need thousands of lines of JS to make it cooperative in real time.
Re:JavaScript hydration is a workaround, not a solution by grey-area on Friday September 02, 2022 @04:55AM (#32688362)
That's not a requirement for most people, versions and locking is fine.

There are certainly refinements that can be added with JS, but JS is not a requirement, and certainly is not for rendering an editable page.

Re:JavaScript hydration is a workaround, not a solution by ItsTooMuch on Friday September 02, 2022 @09:29AM (#32690540)
We're talking about programming apps such as Google docs. It is a hard requirement. Your reply is completely useless from technical perspective. Sorry-not-sorry to be so blunt but I have no sympathy for "yeah you can do it without any JS if you remove all features". Let's just go a little further and throw away our computers - we can send carrier pigeons to each other, right? And what's this paper stuff? Useless! Stone tablets 4ever!

And as a user, it is a hard requirement for me too. I never want to go back to locking and versions, that's absolutely terrible and completely kills the workflow I have with my colleagues. Collaborative docs editing is single most awesome development of the modern web and users are choosing the otherwise not-so-good Google Docs solely based on this feature. Perhaps not every user needs it - but there are countless users that do. If I wanted to edit without collaboration I'd use Word - much better UX and document editing capabilities... Sadly no truly working collaboration - it's too much like locking/versions, so it's not an option. I'd rather use collaborative raw text editor than the best of the best locking/versioned WYSIWYGs.

Re:JavaScript hydration is a workaround, not a solution by spion on Thursday September 01, 2022 @04:22PM (#32682571)
I presume it didn't have realtime collaborative editing or comments?