by corndoge · 11y ago · 0 comments
Edit:
And to all those thinking "but that's the browser", that's my point. We have the browser and while it works, it's incredibly broken in a lot of ways. I'm proposing a system designed from the ground up to do the job that the browser has currently been hacked and add-on'd into doing.
You mean like a browser?
tl;dr you are making the point I refuted in my original post.
...could be worse. At least it's not E-mail.
Honestly, I don't think the browser is so bad. And once wasm takes hold and tooling catches up, you'll have lots of options.
Because ads... are more important to get right than other stuff /sarcasm
It would mean the end of the web, not a return to its beginnings. You wouldn't be dealing with marked-up text, you'd be dealing with binary files (text markup, of course, being a subset thereof). The internet (and whatever emerged on top of it to replace the web) would then be concerned with content, sharing, and identity management only, and applications would be built on top of that.[1]
The trick, as you said, is how to securely run untrusted code. That's what the web (well, I suppose more technically, browsers) are trying to solve; the problem is that the same origin policy, which is at the core of web security, just doesn't work very well. There are a lot of examples where this breaks; here are three off the top of my head:
1. Tracking using javascript to look for unique browser identifiers
2. XSS, CSRF, etc
3. Legitimate cross-site communication
So clearly our existing solution to the "how do you securely execute dynamic, untrusted code" problem isn't cutting it. There's a lot of research (and production code, for the record) going into potentially better approaches though, so I think it's likely we'll see change, if we can get past the inertia behind today's hairball.
[1] Incidentally this is exactly the approach we're taking with implementations of the Muse protocol (https://github.com/Muterra/doc-muse), which uses encryption to provide private content/sharing/identity management on untrusted servers.
Not sure why it's so hard, probably because it's in nobody's interests but the users (as every major just wants to promote their own platform and have the web play second fiddle to it).
However I started to feel the same way a few years ago when the HTML 5 wave started, after several years of doing web development as well.
And yet they never achieved a fraction of what "the current mess" has achieved.
IMHO that's the killer app of the browser... for all it's faults, the HTML+CSS rendering engine is a superior UI description api than anything previously devised.
I remember the brief period I wrote some java apps. The main pain was choosing between rendering a native java gui, or establishing hooks to have it instrument an html interface from behind the scenes. The native gui had better connection to the code... whereas using the DOM was insanely flexible, but talking to the DOM was like trying to drive a car by reaching through the tailpipe.
That I think is why java apps never prospered (outside of the whole "loading" issue... which could have been optimized away if the motivation was there).
---
JS currently has the best of both worlds, and not because of anything native to the language (though it does have many positive points).
I feel like WebAssembly, and things like PyPy.js, are a step in the right direction. Making the DOM and HTML+CSS just another ui library available to the language of the moment. Having PyPy.js is great, because (I assume) where PyPy's python goes, all the other pypy interpreters (Hippy, etc) can follow.
Except it's horrifically slow. It was never designed for widespread dynamic update, and to work around it we have to go to great lengths like having a virtual DOM. Combine that with the widespread incompatibility of different implementations, and I have trouble seeing it as a good UI framework at all, let alone a superior one.
Java wasn't ever intended to compete with the Web; it was the Web that got ideas.
[1] I know, citation needed. Okay. Show me the web app that looks like this, that doesn't kill my EeePC: https://upload.wikimedia.org/wikipedia/commons/2/27/Gephi-07...