4 ms·
This might be classified as a "nailgun" rather than a "framework" if the only thing I'm nailing is paper to cardboard. The whole "Nothin to see here! Check out
by yellowapple 11y ago
This might be classified as a "nailgun" rather than a "framework" if the only thing I'm nailing is paper to cardboard. The whole "Nothin to see here! Check out index.js" indicates to me that this is the precise opposite of a solution to the problem of more and more sites relying exclusively on piles and piles of Javascript with zero regard for accessibility, privacy (by making the site useless for those who disable Javascript to that effect), performance, etc.
- joshstrange 11y agoI'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).
- peterhunt 11y agoPlease don't spread FUD about JavaScript as a detriment to accessibility. It most certainly is not.
- yellowapple 11y agoJavascript in and of itself isn't a detriment, but many of its uses are. That's not FUD, that's reality. If we're going to charge right into this Web 2.0 future of Javascript-only doodads, then there are a multitude of things which need to be considered, like "will a screen reader properly handle my JQuery popups?" [0] or "will a screen reader properly identify a DOM update and read it? [1] or "will a screen reader handle my password dialog in a secure manner?" [2]. And these are all with basic, HTML + bits-of-JS pages, let alone a full-on JS-only web app. That second article makes an excellent point, by the way: that the concept of "interactivity" usually sought after might very well be a biased view of what an ideal interface should look like. Interactivity means different things to different users, and in the same vein can be either a blessing or a curse; it isn't a magical universal solution to all the world's problems. [0]: http://stackoverflow.com/questions/18475332/screen-reader-jquery-popup http://stackoverflow.com/questions/18475332/screen-reader-jq... [1]: http://www.sitepoint.com/ajax-screenreaders-work/ http://www.sitepoint.com/ajax-screenreaders-work/ [2]: http://www.sitepoint.com/show-password-javascript-accessibility/ http://www.sitepoint.com/show-password-javascript-accessibil...
- korynunn 11y agoAccessibility: Screen readers read DOM, not HTML. As long as you produce good DOM, screen readers will work fine. Privacy (JS off): You can't make a complex web-app without JavaScript, and statistically speaking, everyone has it on always. Performance: This can be measured in may ways. - Server time: fastn is just static files, so server time is negligible. - Transport time: fastn apps are often smaller than the DOM they produce, so server-side rendering the content first would only slow down load times. The trivial example app is 31KB, a large AWS-like application at work is about 40KB. - Initialisation time: fastn is very fast. On my old slow work PC, the homepage loads 165ms after page ready, and its about a 700ms wait from hitting the refresh button, to everything being shown. But then, judging by your "paper to cardboard" comment, you aren't here to discuss pros 'n cons :)
- yellowapple 11y ago> Accessibility: Screen readers read DOM, not HTML. As long as you produce good DOM, screen readers will work fine. I'm aware of that. My point was more about DOM changes, which is typically the reason why someone would write a JS-only web app in the first place. That's something that screen readers still handle rather poorly, as I indicated in another comment in this thread. [0] Of course, if you've managed to address those things in fastn, then I'd be pleasantly surprised. > You can't make a complex web-app without JavaScript Sure you can. It might not be quite as "interactive" as you'd like, but interactivity isn't really a requirement. Really, though, my preference is something like progressive enhancement, where the app degrades gracefully should something be missing (like Javascript). In such a context, perhaps fastn would indeed be a good fit as part of that final layer of Javascript. > everyone has it on always. Not true. Plenty of corporate environments block Javascript for security reasons. Of course, it's easy to think that way. "My site is only loaded by people who have Javascript enabled, so everyone must use Javascript; never mind that my sample size might be small, or that I'm not properly logging connections where my JS blobs didn't get to run". This isn't to mention that not all JS runtimes are equal. Safari's different from Chrome, which is different from Firefox, which is different from Opera, which is different from Internet Explorer, which is (supposedly) different from Spartan, etc. At this point, I should note that neither of the two previous points had anything to do with the privacy rationale for turning Javascript off. > fastn is just static files, so server time is negligible. This assumes that there aren't delays from having to load additional files, which is an issue with HTTP/1.x (though not with HTTP/2, IIRC). > fastn apps are often smaller than the DOM they produce, so server-side rendering the content first would only slow down load times. Yes, but that would be offset by having to actually produce the DOM client-side, would it not? It would also be offset by the performance penalty of having a bunch of Javascript running, though I admittedly haven't tested fastn on slower machines yet, so perhaps you've solved that particular problem that other JS-heavy things tend to have. It's like saying I can download a Ruby script faster than a C source file and citing it as an example of how Ruby performs better than C. > Initialisation time That's not what I especially care about, since that's reasonable. My concern is with long-term performance; a Javascript-heavy page or app can easily end up pegging a CPU core or gobble memory or lock up a browser session or tab. Have you benchmarked that sort of thing and verified that fastn is consistently fast? Have you verified fastn's CPU and memory footprints? Remember that the point of server-side things is to reduce the workload on the client. Said workload doesn't go away after initialization. Meanwhile... > On my old slow work PC Define "old" and "slow". Would it be older or slower than a midrange laptop? How about a Chromebook or some other netbook-derivative? A budget smartphone or tablet (or perhaps one that was top-of-the-line two years ago)? Or perhaps one of those cheap Celeron-based desktops that the likes of Staples and Wal-Mart sell for pennies? These categories of hardware are abundant, and yet tend to be hit the hardest with even the slightest Javascript-related performance issue. > But then, judging by your "paper to cardboard" comment, you aren't here to discuss pros 'n cons :) Nah, that's just me being a bit abrasive to make a point. Don't get me wrong; fastn looks pretty cool, and I'd definitely be inclined to use it. It's just the "abandon HTML entirely and pretend that Javascript is the end-all-be-all of web development" that rubbed me the wrong way. [0]: https://news.ycombinator.com/item?id=9815655 https://news.ycombinator.com/item?id=9815655