Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Ajax: Tools of the trade

A rich array of tools for the modern JavaScript developer

  • Print
  • Feedback

Where JavaScript developers were once tool-deprived, today we're often overwhelmed with the abundance of options. In this article, Foundations of Ajax author Nathaniel T. Schutta reviews development environments, debuggers, testing tools, and utilities that elevate JavaScript to first-class status in the Web development world. If you're still programming JavaScript in a text editor, this survey of the modern tools landscape should open your eyes -- and could make your life much easier. Level: Beginner

JavaScript is one of today's most widely used -- and misunderstood -- programming languages. Though it has been a part of the Web development toolbox for years, many developers shunned it after struggling with browser incompatibilities and hitting the limits of alerts as a debugging tool. For some time, the solution was a détente: many software engineers retreated to the comfortable confines of the server and left the JavaScript work to user interface designers. But then the earth moved: Jesse James Garrett coined the term Ajax, a new generation of Web applications was born, and developers' interest in JavaScript was renewed.

If you're one of those who've recently returned to the JavaScript fold, you might be surprised to find a rich suite of tools awaiting you. JavaScript programming today entails more than just a text editor and a great deal of patience. In this article I provide you with an overview of the modern JavaScript developer's toolkit, including IDEs that offer code completion, debugging aids that extend beyond alerts, code and UI testing tools, and other helpful utilities.

IDEs

Back in the days of CRT monitors, the humble text editor was the IDE of choice for the JavaScript developer. Unlike the denizens of the back-end, Web developers didn't have fancy editors with autocomplete and refactoring support; no, we had to walk uphill in driving snow. Today though, the story is different. Spurred as much by the rise of dynamic programming languages as by the importance of Ajax, IDEs now support more than just static compiled languages.

NetBeans, IntelliJ, and Eclipse all offer support for JavaScript -- either built-in or through plugins -- that go beyond basic syntax highlighting. Not sure what the arguments are to that library call? Code completion to the rescue! You'll also find error highlighting, debugging, and even refactoring tools. Figure 1 shows a code-completion example in NetBeans.

Figure 1. JavaScript code completion in NetBeans

Figure 1. JavaScript code completion in NetBeans (Click to enlarge.)

IDEs might not give JavaScript developers quite everything they offer the modern Java developer, but we aren't exactly stuck with a magnetized needle either.

Firebug

Web development arguably has two distinct eras: BFB -- the (prehistoric) time before Firebug when we learned the limits of alerts -- and the modern AFB (after Firebug) when we found that we can once again spend quality time with our families. Firebug truly is Web development evolved. Developing a Web application without using Firebug is like coding Java in vi -- it can be done, but it's just not worth the pain.

  • Print
  • Feedback

Resources

More from JavaWorld