9 ms·
I'm not sure I entirely agree that JavaScript should be developed in a Progressive Enhancement style, for two reasons: If you can live without it (the "progres
by moron4hire 12y ago
I'm not sure I entirely agree that JavaScript should be developed in a Progressive Enhancement style, for two reasons:
If you can live without it (the "progressive" part of progressive enhancement implies that the site is still usable without the JS), then I don't think you should be using JS at all. Semantic HTML and CSS are pretty amazing at adapting content fluidly and dynamically to a wide range of users and devices. Search engines expect documents to be laid out in a certain way. Web scrapers can add a whole pile of usefulness even to sites that don't create explicit public data APIs. You're going to have a serious hell of a time making it any better, and can easily make it a lot worse.
And on the other hand, content sites aren't the be-all, end-all of the Web anymore. The Web is increasingly a deployment platform for applications, and there are a whole host of applications that just can't be done in the browser without JS. Luddites who complain about "but I got JS disabled" aren't the target market for an image-editor-in-the-browser. Failing to load JS at that point is just plain failure to load the application and no amount of Progresso Soup is going to help you.
So yeah, I much prefer all or nothing.
- mariusz79 12y agoI am one of the "luddites". While it's becoming impossible now with all of that JS Overload, I would love to be able to go to a website with JS disabled, and read the text explaining why I should spend more time on the website and trust the website enough to enable JS or some other unnecessary (in the context of content consumption) plugin.
- mariusz79 12y ago> that just can't be done in the browser without JS. And that's fine. I don't think any one should complain when you open a webapp and it requires you to have JS enabled. The problem is that when I go to a website with JS disabled, I often don't get any messages, but blank or simply broken pages.
- scrollaway 12y agoThe web is trying to do two things at once right now: Be a platform for applications and be a medium for textual, document-like content. The former obviously needs a proper scripting language. The latter should definitely be built with progressive enhancement in mind because it's a good thing. Why this urge, on either side, to immediately apply their issues to an area which doesn't warrant it? Apps can't be progressively-enhanced without making things stupid. Documents shouldn't rely on javascript to be readable (in most cases).
- lfowles 12y ago> The former obviously needs a proper scripting language. I wonder, have there been any experiments in major browsers to execute non-javascript code?
- moron4hire 12y agoIE was able to use whatever was installed on Windows, basically from the very beginning, but VBScript was the only one that was commonly used (though I think there was even a version of Lisp that worked). Mozilla (back before there was Firefox) had limited support for VBScript because of this. I remember being terrified in 1998 that there was a good chance VBScript would take off. I think I even had to make a site in VBScript to satisfy a client as late as 2006 or 2007. Later versions of IE were able to run .NET code, which was what SilverLight was all about. So imagine that, it was basically just MS leading the charge, which is probably why we only have JavaScript now.
- scrollaway 12y agoWell, up until recently, Google wanted to add a Dart VM to Chrome. I think they actually did for a while, but you had to use a flag to enable it? (I actually wish they'd have gone ahead with adding the VM... I guess the utopia will be for another day)
- dragonwriter 12y ago> I wonder, have there been any experiments in major browsers to execute non-javascript code? Chrome currently supports NaCl, which allows running native-compiled non-JS code in the browser, but doesn't provide direct DOM access. A number of technologies have been used to provide non-JS code in browsers through plug-in APIs. And IE has directly supported, at different times, a number of non-JS languages in the browser as well. So, yes, and not just "experiments".
- tomjen3 12y agoReddit could work without JS, you would just have to reload the page every single time you commented. You currently have to do that on HN too, so you can see how annoying it is.
- moron4hire 12y agoi.e. not annoying at all?
- romaniv 12y agoIf you can live without it (the "progressive" part of progressive enhancement implies that the site is still usable without the JS), then I don't think you should be using JS at all. It's a disingenuous argument introducing an artificial dichotomy. If I can make a working website in HTML, but it works better with some additional JS, why exactly shouldn't I improve user's experience? And on the other hand, content sites aren't the be-all, end-all of the Web anymore. The Web is increasingly a deployment platform for applications Somehow I don't see a lot of these "applications". All I see is overly complex website that don't work without JS because developers don't know any better or don't care.
- moron4hire 12y agoMy point is, you probably can't actually make it better in even the majority of cases. I haven't seen a single site get hijacked scrolling right, yet. Scrolling is for the browser. And I do see applications in the browser, because I write them. It is really hard to imagine how 3D graphics and virtual reality have anything to do with traditional HTML and browsing habits.