While HTML5, finally standardized, is taking its place in the Web development hierarchy, developers are already looking ahead to HTML6. This is what we might call the radical idea stage.
Still largely in its conceptual and debate phase, HTML6 is foundationally similar to HTML, but with XML-like namespaces. Among the many features and experimental functionality proposed for inclusion in HTML6 is optimization for the growing number of single-page applications on the Web, designed with content loaded dynamically via JSON APIs.
In a post on the W3C Web Hypertext Application Technology Working Group (WHATWG) mailing list, member Bobby Mozumder raised the possibility of implementing the JSON API directly into browsers via HTML in the HTML6 specification, so users can dynamically run single-page apps without JavaScript.
“My goal would be a high-speed responsive Web experience without having to load JavaScript,” he wrote. “This could probably be done by linking anchor elements to JSON/XML (or a new definition) API endpoints, having the browser internally load the data into a new data structure, and the browser then replaces DOM elements with whatever data that was loaded as needed. The initial data could be in header fixtures, which could be replaced later if desired. The HTML body thus becomes a tempting language, with all the content residing in the fixtures that can be dynamically reloaded without JavaScript.”
Mozumder’s informal explanation detailed a new JSON/XML internal data structure separate from the DOM, defined and tagged with a new MODEL attribute that declaratively defines the content in it based on the loaded data. The concept purports that anything in the DOM should be replaceable, including the URL bar and style sheets. Asking for input from the WHATWG community, Mozumder explained his logic.
“I think something like this could eliminate a lot of JavaScript,” he wrote. “These JavaScript frameworks are all trying to do this, but none of them do it easily and they’re always being redesigned. Something should be done to standardize on it at a higher level. There’s a tremendous speed advantage in this, and we shouldn’t have to program in JavaScript for such a common design pattern. Web pages should be loadable with 60FPS speeds and should be as responsive as native apps.”
The proposal has generated animated debate both on the WHATWG mailing list and on Hacker News, with criticism of JavaScript-less single-page apps focusing on the level of complexity, structural issues with the concept, and reasons why similar Web development efforts have failed. The single-page app idea is one of many formal and informal proposals for HTML6, with much more debate to take place before the specification truly takes shape.