by Cameron Laird and Kathryn Soraiz
--OK, I know it's improved a lot ...
language since the ... well, the twentieth century! It's always
been capable of a lot more than its common uses; it's just that
the motivations and habits of its user community are different
from those of, say,
--Hmmm; if it's always been such hot stuff, why have I been hearing
so much more about it this year?
--It's like any interesting story: a combination of history,
dumb luck, individual choices, corporate fashions, technical
realities — the usual suspects. There's the whole
nearly a decade ago, but the browser environment didn't catch
up until, let's say, 5 years ago.
very effective advertisement that "Web desktops" can be
practical, and thousands of experimenters are trying out AJAX
--What I like best about it is that I don't have to think; I
just use MochiKit
another language wrapper to protect me from all that.
--Sure! You can do that; for me, the real point is that AJAX
passed some sort of threshold in '04 or '05, with a rich
libraries, documentation — and enough memory in common
hardware — so that there are useful entry points all up and
down the hierarchy. You can find a reasonably mature toolkit
that lets you focus on the visual decorations you need, and I
can program in the "lightweight" style I want.
--What is it with you and "lightweight"?
--I'm not entirely sure, in fact; I just know this is what's
working for me now. I get to do mind-blowing stuff ... Look,
you can buy a tiny box that runs on a few watts (!) and is
conveniently programmable as a vanilla Linux host. With even
a half-baked solar or compressed gas or other power supply, I
can drop one of these in the middle of nowhere, reach civilization
through a GSM link, and report back on system pressure or
pollutant levels or predator movement or whatever as conveniently
as the stupid "pageview counters" everyone was writing in '94.
--What's that have to do with JS?
--Oh, right; nothing necessary, but JS is just a
convenient answer. Look, I'm not trying to engineer a Mars
Rover; my approach now is to put together commercial off-the-shelf
pieces, like GSM cellular handsets, ARM-based hosts, and so on.
I've tried all kinds of networking, and AJAX-ish architectures
just give me the right combination of rapid development,
scalability, maintainability and reliability for this line.
--OK, sure, so it's been beefed up with all this good modern stuff, but
why saddle yourself with a toy scripting language?
--You know, I owe you; I really need to get you to see JS for what
it truly is. Pick up
, and you'll learn the basics of JS as a language.
It's an interesting language; it fully supports good
object-oriented coding, and people write serious projects in
interpreters in Lisp or Python or other languages, Scheme or
can run standalone JS with
I can write sophisticated small processors, and, in a
browser-dominated world, assume instantaneous deployment.
Oh, I'm getting off the subject. Read Learning
AJAX, DOM, semantics, prototyping, CSS, DHTML, security,
and libraries, so you can judge JS for yourself. The
book has rough edges — typos, and occasional explanations
that call out for editing — but it's got the right attitude,
and you won't bog down in all the cosmetics that are the
point of almost every other JS book.
--Well, maybe. Will I ever use this stuff, though?
--Beats me. Maybe not. Put in a few hours, though, and
you'll at least be arguing from the facts next time you
try to tackle me on the subject. I think you'll find you
like it, though; there are just too many effects customers
are coming to expect that are way easier with JS. Learn
the basics, and have a surer foundation the next time you
argue a design decision. Oh, and one more thing: read
through the comments of
", just to get
a feel for how experienced people think about JS. You'll be glad you did.
run their own consultancy,
Phaseit, Inc. ,
specializing in high-reliability and high-performance
applications managed by high-level languages. Cameron
release, and the language occasionally shows up in these
"Regular Expressions" columns.