Live data from Hacker News

HTML6 proposal for single-page apps without JavaScript

lists.w3.org

61–70 of 177 posts

Re: HTML6 proposal for single-page apps without JavaScript

#61
post #6

I really don't like this proposal. For me, HTML is the markup for the design of the page, while JavaScript makes up the logic. While some frameworks break this, they are strictly opt-in, and they still offer a bit of separation of duties. I'd rather see the HTML standard stay markup-focus for now.

I wish strict XHTML was taken more seriously.

HTML is the structure, CSS is the look, and JavaScript is the logic. With a strict XHTML style you can further enforce this by removing former standards which don't follow that design (e.g. OnClick="" etc).

HTML5 is alright, but I'd like to see a strict HTML5 which bans a ton of classic HTML4.1 elements completely and also follows XHTML's much more logical style (and bans things like
which make no sense).

I understand why they went the way they did (backwards compatibility mostly), but feel like the web would be in a better place ten years from now if a strict spec for at least HTML was commonly used.

Re: HTML6 proposal for single-page apps without JavaScript

#62
post #10

I'm not necessarily opposed to something along these lines, except that it's basically already been tried: XSLT was essentially the inverse of this, where data endpoints were annotated with some static rendering descriptors. To me the XSLT approach seems cleaner, in that the URLs the browser is visiting are for the raw data itself, the URL scheme between machine and human is identical, and so on. XSLT also encouraged…

Yep. I used to love XSLT -- working in it finally forced me to understand recursion at, like, a deep cellular level -- but the whole time I was using it I knew it was a doomed language (because most people don't want to have to understand recursion at a deep cellular level just to be able to lay out a damn web page.)

XSLT is a good idea, everything else about it is just tragic, especially the language to the point I would support Nuremberg style Trials for this kind of events in computer history.

Re: HTML6 proposal for single-page apps without JavaScript

#63

Single page apps seem like a hack to make browser apps feel like they are closer to native apps. Because most SPAs have a set flow, it seems like we should be able to use prefetching to tell the browser what is most likely to happen next. For example, if you are on a list, then you can tell the browser to prefetch the details. What I feel like is missing from this equation is a nice transition between pages. How nice…

And today you can use that markup and shim the transition you want with js - and still gracefully downgrade.

Re: HTML6 proposal for single-page apps without JavaScript

#65

One of HTML's largest flaws is speed. Can't we work on making the DOM faster?

HTML's DOM isn't slow, it is the CSS which makes it slow. When you manipulate the DOM the vast majority of the time spent regenerating it is in CSS, the raw node tree itself is fairly cheap.

Re: HTML6 proposal for single-page apps without JavaScript

#66

Lots and lots of very bad ideas here -- backwards-incompatibility with previous versions of HTML is always a good litmus test that a proposal hasn't been thought through, as is "hey let's restructure everything around this one currently-fashionable design pattern". (I kind of love how he just casually embeds a SQL interpreter in the browser, too, that's a nice finishing touch.) But the main thing is that this doesn't…

+1

There's an "upvote" button, just to the left of the comment above.

Re: HTML6 proposal for single-page apps without JavaScript

#69
Honestly, looks too complicated. I'm doing AJAX without custom JavaScript right now. The way it looks:

You submit the form, it loads the result in the background and replaces content of Y div with content of whatever has id="y" on the new page.

splice-result-into takes any CSS selector as its parameter, so you can apply this to multiple elements at once.

The entire library is around 100 lines of code with no dependencies. 100% backwards compatible, degradable and easy to add to existing multipage apps. It could easily be implemented as a standard HTML feature.

Re: HTML6 proposal for single-page apps without JavaScript

#70
post #16

The use of XMLHttpRequest to fetch JSON has come to dominate to the point that people seem to forget that it had any other use, but it is worth occasionally reminding people that the original purpose was to fetch HTML, which the browser turned into DOM nodes via its fast parsing path, which could then be added to the page via DOM manipulation. I fully realize this is not what the linked page is proposing, but it is n…

Uh, the original purpose of XMLHttpRequest was to fetch XML, as its name implies.

AJAX stands for Asynchronous JavaScript And XML

Post reply on HN