3 ms·
I'm quite stumped at the backlash against only rendering into the DOM and not sending down rendered HTML... Also, as for people who disable JS... Very bluntly:
by joshstrange 11y ago
I'm quite stumped at the backlash against only rendering into the DOM and not sending down rendered HTML... Also, as for people who disable JS... Very bluntly: fuck them.
Are there security concerns at running JS? Sure, but you can't take away a HUGE building block of the web and expect everything to just work. It would be like taking away C from your computer, the whole thing comes crashing down. This and frameworks like this are normally for building interactive interfaces and/or full web apps which (let's all say this together) ARE NOT POSSIBLE WITHOUT JAVASCRIPT. PERIOD. The web is a constantly moving target and if frameworks like this break accessibility then maybe accessibility tools need to be re-written/updated to handle client-side rendering (which is where the web is largely going, optionally with an initial render on the server side).
If we are talking about a blog then sure, needing JS is just stupid, my blog works just fine with or without JS but if I'm building a web app there is no way I can reasonably deliver both a cutting edge JS web app AND a static, submit-the-page-to-do-anything app. If you think that's an easy thing to do then you've either never done it or the web app your were working on didn't deserve to be called a web app. I hear this shit from people all the time about how you "don't need JS"... Sure you don't need JS just like you don't need users which is where you will be if you deliver a shitty non-interactive website.
TL;DR: People not using JS are simply not worth the effort to support and if screen readers can't handle JS client-side rendering it's the readers then need to change not the web. It's simply unreasonable to expect all web developers to account for every single edge case. Taking away JS is taking away one of the building blocks of the web and is a BAD idea.
- JustSomeNobody 11y agoWhen a web site takes over 10 seconds to load and elements are jumping all over the place as things are rendered, the first thing I'll try is disable Javascript. Next I just say hell with it and not visit the site. So... fuck you.
- joshstrange 11y agoThe situation you describe is not one I experience in web APPS. I DO experience it on blogs/news ALL THE TIME and it's normally due to ads being injected. I'm sorry but that's a completely different example then what I'm talking about and rarely due to a framework. I even said: > If we are talking about a blog then sure, needing JS is just stupid, my blog works just fine with or without JS but if I'm building a web app there is no way I can reasonably deliver both a cutting edge JS web app AND a static, submit-the-page-to-do-anything app.
- yellowapple 11y ago> The situation you describe is not one I experience in web APPS. You clearly haven't used very many of these "web APPS" you champion, then.
- joshstrange 11y agoCould you please give an example of one that has this sort of "bug"?
- yellowapple 11y agoNot off the top of my head; my only reaction when encountering such "apps" is to immediately close the tab. Why should I keep those in memory? To have myself an argument with some other HN reader? Please. I'd say that a hefty chunk (if not a majority) of "Show HNs" involving Javascript-heavy anything are riddled with bugs, among said bugs being elements moving around as others load. It's just like web pages in the 90's; for every excellent and well-known app, there tend to be several mangled ones. EDIT: come to think of it, DuckDuckGo (which I otherwise absolutely love) is a good example of what's being referred to; some elements (particularly for instant answers and "sponsored" results) take longer to load than the search results, and I've found myself frequently clicking the wrong link because of my intended link shifting down without warning. This was especially prevalent prior to the recent redesign (nowadays it seems to be less of a problem). While maybe this doesn't fit your definition of "web app", it's still relatively JS-heavy by default (though DDG is also an excellent example of progressive enhancement / graceful degradation) and is a decent demonstration of web-app-like concepts (and, in my belief, fits the actual definition of "interactive web app" quite well).
- Zikes 11y agoThis library is clearly intended to create dynamic and interactive interfaces, too. If you've got JS disabled, whatever you build with it wouldn't work if you built it with literally any other JS framework or library anyways. There's no more reason for people to get angry over this JS library than there is to get angry over jQuery, Angular, React, or anything else people have been using to build fully functional products on the internet for years.
- roneesh 11y agoIn my opinion, most sites should at least maintain a core subset of functionality that can work without JS. Sites existed before JS that let people read news and engage in commerce, there's no reason we should lose all that. Also, as we now enter a future where billions of people who never used a desktop computer begin mobile banking, being able to conduct business without JS might be one avenue to combat fraud.
- joshstrange 11y agoWhile I agree in concept in reality this is normally not possible. For a company like Google? Sure but for most companies out there they just aren't going to have the developer and QA resources to continuously test both JS and no-JS flows. For banks? Yes they can probably support both but honestly banks will probably move to MORE js to thwart fraud as in making sure you are a real person based on our mouse movements or other things. As for news sites, 10000% they should work without JS, the printed word is their bread and butter (even with some place coming up with more interactive news stories) so they should have no trouble supporting no-js browsers. There is a fear that they may just say "fuck you" to non-js people though if it significantly affects their advertizing (Lack of tracking or dynamic ad injection).
- yellowapple 11y agoThere's a good article on progressive enhancement (which is, alongside / in addition to graceful degredation, what's usually referred to when one talks about JS/non-JS hybrid flows) that addresses the cited pain points and "myths". [0] The claim that PE is "twice the effort" is directly addressed; basically, it's not twice the effort at all if one actually designs one's app to support PE/GD from the start (or otherwise starts with bare server-generated HTML and adds on layers of interactivity from there). [0]: http://www.sitepoint.com/javascript-dependency-backlash-myth-busting-progressive-enhancement/ http://www.sitepoint.com/javascript-dependency-backlash-myth...
- yellowapple 11y ago> If you think that's an easy thing to do then you've either never done it or the web app your were working on didn't deserve to be called a web app. I actually do this on a daily basis as my dayjob. If you're using a proper server-side framework, this is quite trivial. Of course, I already expect you'll retort with some half-assed no-true-Scotsman ("well your web apps aren't real web apps!"), in which case I'd likely ask for your definition of "web app", why said definition is unattainable without creating some Javascript-only monstrosity, and why said monstrosity isn't implemented instead as a native application if it really does go beyond what a more sane use of HTML/CSS/JS/some-server-side-scripting can offer. > if screen readers can't handle JS client-side rendering it's the readers then need to change not the web. And how would you go about implementing that? A text-to-speech interface isn't like a visible webpage, where you can easily scroll around and jump from thing to thing and notice that some random DOM element has changed. Perhaps the screenreader could read newly-created DOM elements, but that'll become really annoying for elements that frequently change/disappear/reappear, as is often the case for web apps of the variety that you advocate. This isn't to mention that not all screenreaders are auditory. Quite a few blind computer users use braille displays. How will your web app work with such displays? How will it work with a keyboard and no mouse (since what good is a mouse pointer if you can't see the pointer on the screen)? Or is your answer to just say "fuck them"? > It would be like taking away C from your computer, the whole thing comes crashing down. That's not quite true (and, in fact, is rather amusing in this day and age of C-ABI-compatible languages like Rust being the latest hot shit). Plenty of operating systems are written in languages other than C, and it's very much possible to have a computer without any C code at all. Hell, even with C, removing C won't do a whole lot; the computer is executing compiled machine code, not trying to run C directly. --- In my opinion, rendering into the DOM exclusively is just as much an affront to the concept of a "semantic" web as using HTML tables for creating a page layout. Save the Javascript for things that actually need interaction; for everything else, plain HTML is not only sufficient, but even superior, since it's less likely to break on some confounding variable like whether I'm using Chrome or Firefox (or, god forbid, Internet Explorer) or whether I'm blind and my screen reader doesn't readily handle elements flying in and out of existence at arbitrary points in time. That's the point of the "semantic" web, after all: HTML for content, CSS for presentation, Javascript for interaction. Just because breaking away from that is popular doesn't mean it's a smart thing to do. This isn't to say that such behavior is always unacceptable, of course; there are web apps that do JS-only things rather well (Trello, for example). That tends to be the case when a JS-only approach is absolutely necessary. 99% of the time, however, HTML would be more than sufficient, with maybe some Javascript here and there to make things prettier. For the remaining 1%, a public API would do wonders for those seeking to build more accessible clients, in which case the web app being JS-only wouldn't be quite as much of a problem. Of course, at least Trello has a warning in <noscript>...</noscript> tags telling users to enable Javascript. The bit of HTML my comment responded to didn't even have that courtesy. Your viewpoint would be more acceptable if Javascript weren't the sluggish and fragile pile of shit it currently is and has been throughout the entirety of its existence. Until that core problem is fixed, the backlash will continue, and the fuck-you will be mutual. --- EDIT: to further clarify my approach, I'd be totally fine with something like progressive enhancement [0], which is arguably much more robust than relying on JavaScript existing. Web apps do, after all, have a tendency to break rather horribly even between modern browsers, let alone slightly-outdated ones; having some defense against that is the responsible thing to do. [0]: http://www.sitepoint.com/javascript-dependency-backlash-myth-busting-progressive-enhancement/ http://www.sitepoint.com/javascript-dependency-backlash-myth...