by onion2k · 7y ago · 0 comments
No it's not. It never was. Even a long time ago when websites were static things rendered by the browser once and then left alone there was always a tree of nodes underlying everything. The only thing that's changed in the past three decades is that now when we make websites and web apps we often ship a little JS application that lets the user modify the underlying tree. That's what the web is now and HTML is just what we use to describe the initial state of the tree (and arguably it's the wrong language for that job, but hey ho). Using semantic markup is important for a bunch of things like accessibility, but you can't really expect the initial state of the page to stay the same after it's loaded, and software that renders things from the web has to deal with that.
If you're old enough you might remember that once there were no stylesheets. HTML wasn't just the content and structure, but also the visual description. We used font tags. We used color attributes. We used spacer gifs. We don't do that now because it sucked. We moved forwards. The same is becoming true for HTML. Users demanded interactivity, and we gave them exactly that, and browsers turned in to things that run little applications rather than things that render mark up. The web has grown and evolved and moved on, and thinking of the web as "HTML pages" is just plain out of date.
That's not to say static content isn't still useful. It is. Very useful. But static HTML pages isn't the web, and the single page application genie isn't going back in the bottle.
Viewing "pages" and "apps" as wholly separate and mutually hostile paradigms seems to be a recent cultural development born more out of frustration with advertising and modern complexity than any technically meaningful distinction between the two.
Well there is a pretty fundamental tension between programs written in a Turing-complete language and a program written in one that is not. Resorting to too much power too early is dangerous and messy.
Maybe, but you still can't consider anything running javascript an "app" and anything not a "document," since interactivity and state isn't bound to running javascript, and most javascript is just used to render documents.
My point is that the distinction people draw between the two is more emotional than technical.
>Resorting to too much power too early is dangerous and messy.
To be fair, notwithstanding exploits in the underlying browser or hardware which lead to things like Spectre, at least javascript is sandboxed. No one is going to be able to sneak "rm -rf /*" into a script and have it work the way they could a native application.
It is fair to note this, but I would still take those examples as indicating the inherent dangers and failures of the paradigm. It's obviously infinitely better than just naively sticking native code execution into the browser without any protection at all, but that does not mean it is ultimately a good approach.
... yes ? the name of this "tree of nodes" is not "Document object model" for nothing.
There's no native way to link to specific objects in the DOM that are not identified as part of the document through an ID; the anonymous objects in the DOM can only be accessed programmatically, URLs have no syntax to traverse the tree like there is an "#anchor" section for accessing chapters.
We almost had it at one stage
As I like to occasionally point out in wasm threads, the browser was a thing that ran little applications all along, in the form of Java applets. I have yet to see an explanation of how wasm applets are a different approach to the problem, but they sure are a more popular one.
Also Java tried to be a gateway out of the browser to the OS, and that's just a terrible idea for security. WASM isn't trying to be that, and hopefully it never will.
Given that almost every thread about WASM includes someone like yourself wondering why it isn't just a pointless rehash of the JVM, I have to assume you would have already seen the numerous discussions about the differences at length.
Here is one: wasm is smaller and better sandboxed
(Citation needed.)
Developers love interactivity. Users despise it but put up with it because there's not much choice.
Does anybody think the Web is a better experience now than it was 15 years ago? Honestly?
They didn't demand it per se because no one actually asked. I'm inferring from the fact that users spent much more time on the interactive websites which resulted in more revenue for those sites and everyone else copying. There might have been a reason other than the interactivity itself, but we are where we are now because of user behaviour.
How efficient? The most popular sites on the internet are about _fun_, not _efficiency_ ;-)
Source: The HTML 3 Specification.
It started out that way, but grew to TRY to replace GUI's, Flash, etc.
We need three different standards: one for documents (HTML may be good enough); one for media, art, and games; and one for desktop-like GUI's. There may be some overlap between these, but the one-size-fits-all of HTML/CS/JS has been a big messy time-sink where otherwise simple UI tasks take rocket science and luck to get right.
These are low level enough, and powerful enough that you can build document, multimedia or application frameworks on top of them. Simple UI tasks don't take rocket science, they take a proper understanding of those three standards, and a lot of discipline.
I appears to me you are contradicting yourself. It comes across as: "It doesn't take the discipline of rocket science, but merely the discipline of rocket science". GUI's didn't take "a lot of discipline" in say VB-classic, Delphi, or Oracle Forms[1]: you dragged it to where you intended it to be, and Wazaam, it was there and always there. WYSIWYG was a huuuge time-saver. Now to do it right you have to test on dozens of platforms and versions because they each have a mind of their own. WYSIWYG gave you one central coordinate reference point, not 30 different positioning engines.
Re: "We already have 3 different standards: HTML, CSS, JavaScript."
That's part of the problem, not a solution. They are not domain-specific, for one.
[1] They had glitches, but were getting better over time.
rocket science !== discipline
VB-classic, Delphi, or Oracle Forms have whats known as drag-and-drop/visual programming. Comparing them to CSS & HTML isn't a fair comparison, unless you compare that to a drag-and-drop GUI that creates HTML & CSS for you.
Single page applications are the corporate web. The profit web. The web that exists to squeeze information and money out of you without ever sharing or exposing any of itself. SPA are a cancer on the web that aren't going back in the bottle. Corps are gonna corp and institutions will follow.
But you, the single web dev, don't have to take this bullshit design philosophy home with you. Just because you have to shovel manure at work doesn't mean it's beautiful or that you need to bring the shovel home for personal projects. Get paid for shoveling shit. At home make real web pages.