Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > Usability

Web Design Reference Guide

Hosted by

The Re-emergence of JavaScript

Last updated Oct 17, 2003.

It's been almost 10 years since the days of "DHTML madness," a time when the term DHTML—dynamic HTML, referring to JavaScript—was used by every marketeer jumping in on the booming Internet industry. DHTML was going to "push the Web forward" and as such, every company that claimed to use it was likely to receive good amounts of venture capital. Then the big Internet boom went bust. Over the years that followed, JavaScript earned itself a terrible reputation. This lousy rep was due in large part to the countless "plug-and-play" scripts that brought interaction to Web sites. These scripts had three distinct problems:

  1. More often than not, they were annoying rather than helpful.
  2. Their code was very poor, causing conflicts and slowdowns.
  3. They were too popular, resulting in a lot of "JavaScript-happy" Web sites.

As a result, many people came to think of JavaScript as evil. It didn't help that JavaScript was usually implemented as a last resort, a last-ditch effort to mask a site's true lack of quality. Web designers worth their salt increasingly ignored JavaScript, labeling it a "tool for amateurs."

In reality, it was more a tool for developers. Developers usually don't know—or care—as much about design as Web designers do, but they build and maintain Web sites anyway. This excuse didn't go far to save JavaScript's faltering reputation, especially since many developers didn't bother writing quality JavaScript, but instead simply copied and pasted the same lame plug-and-play scripts that everyone else was using.

On the whole, it was a sad state of affairs for anyone who cared about JavaScript.

More Misfortune

When, in 2000, the Web Standards movement started to pick up some momentum, JavaScript was hailed as one of the trademarks of the old Web, the Web before CSS-based design techniques started to become a feasible option. Enthusiasts joined the so-called Standardistas—people fighting for the promotion and adoption of the proper uses of Web standards—and many of them were a little too enthusiastic, throwing JavaScript in the same corner as table-based design and font tags.

For a few years, this trend continued with only a small group of people actively promoting JavaScript. These tireless evangelists tried to explain that JavaScript is merely a tool that can be used for good as well as evil, and that when it is used properly, it can greatly enhance the user experience.

Fortunately for all of us, the cries of this (growing) minority were heard, and the Standardistas began to take a more neutral stance toward JavaScript. People began to realize that, indeed, it was just a tool, and it could do very good, useful things. There was nothing inherently evil about JavaScript—it was all perception caused by the great amount of really poor JavaScript we saw in our everyday lives.

The real breakthrough for JavaScript came when all the major browser vendors began using the XMLHttpRequest object, making it extremely popular. Although Microsoft created the concept with its XMLHTTP—an ActiveX solution—it wasn't until the Mozilla project added XMLHttpRequest to its Mozilla browser, with various other browser vendors following suit, that the concept and technology became a viable solution for Web developers. Several versions of the concept had been around for years, including a simple technique using HTML's inline frames, but it never got a lot of mainstream attention.

When Google published two high-profile applications that used the XMLHttpRequest object heavily—Google Maps (February 2005) and Gmail (April 2005) — JavaScript saw a huge and long-awaited boost in popularity. Prior to this, Jesse James Garrett of Adaptive Path coined a term to represent the suite of new technologies he was about to propose to a client: Ajax, or Asynchronous JavaScript And XML.

The Ajax Revolution

Before too long, Ajax became the hot buzzword among Web designers worldwide, and suddenly JavaScript was "in" again. There was still plenty of opposition, but it was much more concrete and focused this time around. The rather vocal minority, which had until then treated JavaScript as little more than an outdated Web development technique, evolved into two new camps: one that silently used JavaScript for better purposes, and another that aimed its efforts at Ajax—or, to be more precise—the thousands of people that were jumping on the Ajax bandwagon.

Criticism over Ajax's incredibly rapid spread emerged from all directions. The Web standards community, venture capitalists (that is, those that weren't funding dozens of new startups), and corporate management all expressed concerns over the many "Web 2.0 startups" that were receiving millions in funding without any decent business plan to justify it.

Nevertheless, all the excitement over Ajax gave those people promoting the proper use of JavaScript a much larger audience. Suddenly, if you were talking about JavaScript, all you had to do was include the term Ajax somewhere and you'd be guaranteed a much larger audience.

With that many more people paying attention, it wasn't long before JavaScript shed its negative image entirely. The public perception is no longer that JavaScript is inherently evil; instead, people are starting to feel that, if used responsibly, it could be an invaluable tool indeed.

Ironically, many of the people promoting the proper use of JavaScript also raised their concerns over Ajax and its popularity. To them, far too many developers were using Ajax in all the wrong ways, and they—rightfully—feared that all these poor, even harmful, implementations of Ajax would end up giving JavaScript a bad name again.

Despite all the criticism centered on Ajax, it has done one tremendously important thing: It put JavaScript on the map as a potentially great tool for thousands upon thousands of people. It's still imperative that we promote JavaScript to be used as a progressive enhancement, but at least we no longer have to worry about people ignoring JavaScript entirely thanks to a preconception that it is somehow a bad tool.

JavaScript Creativity

When the Web standards movement picked up momentum, the freedom inherent to CSS-based design inspired new groups of people. With semantic, clean markup in place and CSS for presentation, JavaScript now offers Web authors easy control of the page and the user experience.

Renewed interest in JavaScript warranted a renewed look at what JavaScript can do and many people were happy to discover that it's capable of doing quite a lot. In particular, it has offered developers and designers brand new ways to present Web pages.

One such example is FACE, which we've covered at Informit previously, but much larger than that are so-called JavaScript libraries, such as Prototype and the Dojo Toolkit. These collections of JavaScript functions and objects have made it easy for people to include a great variety of JavaScript-powered effects and enhancements in their pages, some of them Ajax-related.

In our next piece, we'll take a look at what Prototype and Dojo have to offer you, the Web designer or Web developer.