Good JavaScript usage is a good thing

January 14, 2013

A commentator on yesterday's entry wrote the standard sort of anti-JavaScript note. Quoted in part:

[...] 99.9% of websites do not need scripting. (Perhaps 100% -- google maps should be a standalone program.) I am convinced JS is a make-work phenomenon by a large amount of underemployed web-monkeys, desperate to create "work" that is not needed. [...]

I disagree strongly. Despite my grumbles yesterday and despite my use of NoScript to mostly block JavaScript in my own browser, I am all for well-done JavaScript usage. There are two things that JavaScript is really good for.

The first and most obvious is enabling interactive web applications that would not be possible otherwise. Google Maps is a good example, as are a number of other highly interactive and responsive websites (some of them operated by Google). The second is for augmenting already functional websites with additional useful interactivity, a topic I have some experience with. There are any number of websites that do this (if you browse with JavaScript on you probably don't even notice this).

It is no accident that I've emphasized interactivity in both cases. The problem that JavaScript fixes is that without it your only real way of interacting with a web page and a web server is by clicking on things and generally getting a new web pages. Clicking on things is a fine way of getting stuff done, but the problem is that it is obtrusive, limited, and explicit. There is a universe of other ways of interacting with an application (eg clicking and dragging) and another universe of automatic actions that an application might want to take without requiring the user to explicitly invoke things with a click.

What's bad about JavaScript is threefold. First, people have used it to do evil things. Second, people have used it to create terrible, obnoxious interfaces. And third, what I ranted about yesterday, people have used it to destroy otherwise functional websites. But none of these are intrinsic in JavaScript itself. JavaScript is a tool that can be used well or used badly.

Sidebar: Why I disagree that Google Maps should be a program

I will put it simply: if Google Maps was a program, it's likely that I would not be able to use it and it's even more likely that people using FreeBSD would not be able to use it. The advantage of JavaScript applications is that they are more or less portable more or less for free.

(This is not just portability between operating systems. It is also portability between Debian, Fedora, Ubuntu, SUSE, and so on, and between old distribution releases and new ones.)

Written on 14 January 2013.
« Blogspot's massive web 1.0 failure
Why JavaScript (or something like it) is in demand »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Mon Jan 14 01:33:42 2013
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.