Live data from Hacker News

HTML6 proposal for single-page apps without JavaScript

lists.w3.org

11–20 of 177 posts

Re: HTML6 proposal for single-page apps without JavaScript

#12
post #8

I think we should keep HTML simple and enforce a strict separation between template and logic. However, I do like the idea of adding a native "model" attribute to the DOM element that can automatically get/parse json and update accordingly.

Have you ever used React? What do you think about the React/Flux methods of mixing template and logic?

Re: HTML6 proposal for single-page apps without JavaScript

#15
This is interesting, but like others I think HTML should be kept strictly for templating, and this adds an unnecessary amount of logic. It might be tempting to see this as removing complication, but in actuality it will probably add to it by reducing separation of concerns.

I think it would be good for less ambitious projects, but in the end it would cripple the building of more ambitious ones. If we already have Angular/React/Components/Whatever, shouldn't we just keep working on them and leave the HTML spec unpolluted?

Re: HTML6 proposal for single-page apps without JavaScript

#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 not clear to me that using that wouldn't be a better idea, leaving the selection of templating to the user. Template languages, while smaller than programming languages, share their characteristic that there isn't obvious One Solution That Solves Everything. You can optimize them for different use cases and it is not clear to me that we can or should privilege one over the others. Given how rapidly the web is heading away from an overprivileged programming language being the only choice, this seems like going the wrong direction.

(Also, if your template language is slowing your server down, fix that. That's a problem with your implementation language, not the fundamental concept.)

Re: HTML6 proposal for single-page apps without JavaScript

#17
spa apps are more complex that the example. Sure it looks it could work but the amount of logic within an SPA is not just a simple click here , fetch json , replace html fragment. The title is a bit misleading. I don't think it's possible to do SPA without Javascript.

Re: HTML6 proposal for single-page apps without JavaScript

#18
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 solve any problem that exists. We can already do everything his proposal would enable; all this does is make it more inflexible.

Re: HTML6 proposal for single-page apps without JavaScript

#19
I don't like this. I would like to see a standardized html way to load html partials into other html, similar to ng-include. I think that is clean. But to start mixing logic? How are you supposed to render a JSON array loaded via ajax? How do you put in authentication information or headers? How do you do error handling? This is the stuff that is handled by angular or ember or knockout or aurelia or etc.

Re: HTML6 proposal for single-page apps without JavaScript

#20
> Everyone’s into it because the responsiveness is so much better than loading a full page - 10-50ms with a clean API load vs. 300-1500ms for a full HTML page load.

Maybe if you start with an argument to support your claim, you want to have actual numbers. And those real numbers would tell a different story.

Post reply on HN