7 ms·
A Web page is a document. 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 the
by onion2k 7y ago
A Web page is a document.
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.
- thaumasiotes 7y ago> 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. 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.
- onion2k 7y agoThe difference is timing. Computers weren't really ready for applets back in the mid-2000s when Java was pushing to be the thing that made web pages interactive. The performance (in terms of download speed, start up, and actually running them) was usually pretty horrible. Now the hardware has caught up it's the language that's the bottleneck, so WASM might prove to be a decent idea. 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.
- krapp 7y ago>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. 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.
- afiori 7y ago> I have yet to see an explanation of how wasm applets are a different approach to the problem Here is one: wasm is smaller and better sandboxed
- meerita 7y agoIt is, definitions of HTML are widely clear: "Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser." If a document has interactivity, that doesn't mean it will lose its definition.
- onion2k 7y agoThat's why I suggested maybe HTML isn't the right language for defining the initial tree state of a web app these days, but it's what we've got so it's what we use. I think web apps, and web pages too to some extent, have outgrown HTML.
- meerita 7y agoMaybe in the future, W3C would do a solid AML Application Markup Language, but they did that with XML.
- krapp 7y agoThe truth is both web "pages" and web "apps" are documents, and both are the web. Web pages which use javascript to render text or fetch remote content by AJAX can still be as much documents as fully static HTML pages, if their primary purpose is to convey textual or visual information. And fully static sites can be made interactive without javascript, though backend processes. 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.
- feanaro 7y ago> 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.
- krapp 7y ago>Well there is a pretty fundamental tension between programs written in a Turing-complete language and a program written in one that is not. 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.
- feanaro 7y ago> 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.
- jcelerier 7y ago> 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 ... yes ? the name of this "tree of nodes" is not "Document object model" for nothing.
- onion2k 7y agoI know. The problem with that name is people seem to stop reading after "Document".
- TuringTest 7y agoThough the web is made of documents, not the objects within. 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.
- omegabravo 7y agohttps://developer.mozilla.org/en-US/docs/Web/Web_Components/HTML_Imports https://developer.mozilla.org/en-US/docs/Web/Web_Components/... We almost had it at one stage
- bandrami 7y ago> Users demanded interactivity (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?
- onion2k 7y ago(Citation needed.) 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.
- asdff 7y agoHow efficient was that increased time spent? Does the user actually read more text or are they spending more time just fighting with the site layout? I guess the answer doesn't matter if there is an ad on the page.
- oblio 7y ago> How efficient was that increased time spent? How efficient? The most popular sites on the internet are about _fun_, not _efficiency_ ;-)
- bandrami 7y agoOMG, that is perverse. Users spend more time on the sites because the sites are slower to load and more difficult to use.
- crysin 7y agoYes. I do. Not that my opinion matters much. I was born in 91, I grew up as the internet grew up. Before I understood HTML or anything about programming, I used the web to watch videos on Lego.com or play really bad flash games on Newgrounds. My experience with the web has always been visual and interactive. Only time I used the WWW for purely document purposes was when doing homework.
- superkuh 7y ago>But static HTML pages isn't the web, and the single page application genie isn't going back in the bottle. 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.
- rangerpolitic 7y ago> HyperText Markup Language (HTML) is a simple markup system used to create hypertext documents that are portable from one platform to another. Source: The HTML 3 Specification. https://www.w3.org/MarkUp/html3/intro.html https://www.w3.org/MarkUp/html3/intro.html
- BlueTemplar 7y agoThis seems to be a matter of definition : IMHO single-page applications are definitely NOT the Web, but a different subset of the Internet instead (even if you can access them via HTTP).
- tabtab 7y agoRe: [A Web page is a document.] No it's not. 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.
- orange8 7y agoWe already have 3 different standards: HTML, CSS, JavaScript. 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.
- tabtab 7y agoRe: "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.
- orange8 7y agorocket sceince !== proper understanding 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.
- masswerk 7y agoTo be fair, HTML started as an SGML application, meaning, as a declarative language. In this aspect, it's not so much about static vs dynamic, but about two cultures of programming. However, there's a place for both approaches – and probably it's about the right mix.
- c0vfefe 7y agoYou've drawn a false dichotomy between document and tree. A tree is a mathematical abstraction, a document is a text-based file, and markup languages are the intersection of those. Web pages were always documents according to the HTML specification, as one of your replies linked to.