Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

Is JavaScript here to stay?

The challenges facing this leading user-scripting language

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

Page 2 of 4

"And then came the bugs, Doc, thousands of 'em!"

I wrote this paragraph a dozen times, trying to find the way the best way to put it. But there is no "best way" to put it. The fact is, JavaScript has bugs. Some might even say more than its share.

To be truthful, most of these bugs are innocuous, and many are related to differences between the documentation and the actual behavior of the language. No big deal; just mentally correct for the errors in the documentation. For example, the documentation for Netscape 2.0 discusses using JavaScript to read the value of a password form control. Yet for security reasons JavaScript is unable to read the value of password controls.

Yet other bugs are caused by incomplete implementation. JavaScript supports blur(), focus(), and click() methods for form controls, for instance, yet these methods are non-working on many platforms.

One more annoying JavaScript trait is differences of operation across platforms. Some cross-platform incompatibilities are to be expected, given that Netscape is available on four major operating systems -- Macintosh, Windows 95/NT, Windows 3.1, and Unix (if you count all the flavors of Unix, the number of supported platforms more than triples). To the Web page designer, however, differences across platforms is perhaps JavaScript's most frustrating personality quirk. It's not unusual for a developer to spend hours and even days or weeks perfecting a script under a given platform, only to discover the script crashes Netscape under a different platform.

Finally, JavaScript continues to suffer from inconsistencies between interim releases. Features that were working in one release sometimes stop working in the next, and perhaps return to operational status in the release that follows. Case in point: the document.close method. This method was working fine in the original release of Netscape 2.0. But in the 2.01 interim release, the document.close method was somehow broken, and scripts that relied on it no longer functioned.

To its credit, Netscape quickly repaired the document.close method for the 2.02 interim release, but the damage had already been done. Millions of users downloaded 2.01, and a percentage still use it. Since 2.01 users are still be out there, Web designers are advisesd to take the conservative approach and develop work-arounds that will function on all versions. This is not an easy task, and it unnecessary adds to development time.

These inconsistencies have created a mini turmoil among some JavaScript experimenters. Their venom can occasionally be felt on the three major newsgroups that support JavaScript: comp.lang.javascript, netscape.devs.javascript (a semi-private newsgroup hosted by Netscape), and livesoftware.javascript.developer. One former enthusiast even created a "Netscape Abuse Page," at http://www.myna.com/mccollam/netabuse.html, where the guest of dishonor is JavaScript.

Will the bugs be fixed? Netscape adamantly promises so, having added more developers and testers to support JavaScript in version 3.0. Thanks to its name change and heightened sense of importance, back in the Netscape 2.0 beta days the role of JavaScript far exceeded its original design specification. Yet Netscape management failed to adequately address the need to add more developers to tackle the blossoming feature list. The bulk of the work of JavaScript in version 2.0 was the responsibility of a single (and I might add hard-working) developer at Netscape. Try as he might, he could not deal with all the issues in the break-neck schedule of version 2.0. The result: the language was allowed to be released without adequate testing.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources