3 ms·
I see three problem here, none of which have anything to do with HTML as a markup language. 1. The amount of DOM manipulation required for a relatively advance
by thomasfoster96 12y ago
I see three problem here, none of which have anything to do with HTML as a markup language.
1. The amount of DOM manipulation required for a relatively advanced single page app is not very efficient, quick or performant.
2. Web apps don't work well without a reasonably up to date javascript engine - users may not even allow Javasacript to be run. This breaks alot of web apps.
3. There isn't an (easy) way to request parts of a resource easily using HTTP.
Luckily these issues have solutions:
1. Invest time in a new successor or radical improvement over the current DOM - think an asynchronous, thread safe API. Fix things that deal with HTML, don't try and make HTML anything more than a markup language.
2. Either make your web apps fallback to HTML + CSS or start convincing people that using Javascript isn't a huge privacy issue. Fallbacks can be easy if you want them to be.
3. I'm sure there are way to request specific parts of a page (indeed, I coded such a way myself in PHP a few years ago), but someone needs to build an awesome abstraction over HTTP to make this easier.
- emodendroket 12y ago> Either make your web apps fallback to HTML + CSS So make two Web apps with the same functionality, basically?
- insin 12y agoOr make one app with an isomorphic base which gets progressively enhanced when JavaScript runs on the client.
- emodendroket 12y agoYes, but if you're doing a true "SPA" then "progressive enhancement" really does just mean having two versions of everything.
- insin 12y agoNot any more - once you can prerender the "SPA" on the server and use the same codebase to rehydrate it on the client and take over - which you can do today with React and soon with Ember - then with the right setup the "progressive enhancement" bit can be "am I on the client now? let's do some extra stuff" implemented as part of the same component. e.g. here's a form that uses the same React component to render on the server, to handle regular form submissions and render redisplay when invalid and to progressively enhance with live validation and ajax form submission when JavaScript is available on the client: https://isomorphic-lab.herokuapp.com/add-thing https://isomorphic-lab.herokuapp.com/add-thing
- thomasfoster96 12y agoI'm Sure a lot of single page app features have a simple fallback - things like tabs, sliders, carousels and most navigation can be done with just html + css.