application/nd-javascripttutorial
application/nd-javascriptMIME type could work, as a substitute for the beloved HTTP HTML stream. It simulates a stream of newline-delimited JavaScript statements and shows how they build & update a web application.
application/nd-javascriptitself is not interesting.
application/nd-javascriptis a means to discuss evolving beyond
text/htmlfor transmitting applications. Sadly, because this capability does not actually exist in browsers, the following demonstration is faked. Whether a real implementation uses
application/binary,
application/wasm, or another similar MIME--any or all would be welcome.
application/nd-javascriptis used for simplicity and because of its proximity to existing browser APIs. The following document uses the term "app" or "application" to describe browser experiences that warrant JavaScript usage, and"document" to describe browser experiences that do not.
react,
svelte,
solid, etc. These toolkits are for building applications--and ultimately, DOM nodes. Indeed, they can generate HTML, but that is an important secondary feature. HTML is side-effect of these frameworks' DOM CRUD. Their primary objective is to make application development easier by applying tools that result in a predictable & DX-friendly DOM tree. Thus, if we have established that our primary application toolkits excel at
DOM-opsand handling user events, why is it then that we commonly burden ourselves with also generating HTML? Most senior web-devs have all heard of
VirtualDOMby this point. Why is there no
VirtualHTML(/s)? For server side rendering, why do we use DOM-first libraries, convert to HTML, then post-hydration, go right back to DOM? The answer is that we have to, not that we want to. Can we cut out the HTML middleman and operate with DOM from start to finish? HTML is wonderful DSL for documents, but for applications it is pure overhead. For applications, our community would likely operate on DOM directly if the browser would allow us. Imagine if all of the power backing browser's HTML engines were actually APIs that we could tap into at boot time!
Name | Status | Type |
---|
GET https://ndjavascript.cdaringe.com/
user-action