What is in your JavaScript toolchain?
At the time of asking this question, Google’s closure compiler was not in contention.
This is a seriously good tool that minimifies JavaScript better than many others out there. You can run it with page speed to analyze existing websites. It has a lot of other functionality built into it,like detecting dead code, references etc.
What editor and editor plugins/modes/scripts do you use? I'm generally an Emacs user, and am using js2.el at the moment, but I'm interested in hearing about other setups.
I generally use Textmate (with the JavaScript, jQuery, and Prototype bundles). When doing heavy front-end development, where I'm tabbing rapidly between HTML, CSS, and JavaScript files, I'll opt for vim's split panel views. When doing so, I either use macvim or Terminal + Visor, depending on my mood. Obviously, I'm a Mac user.
Do you use any sort of IDE (Aptana, Dashcode, or the like)?
No. I used to use Coda, but its text editor features leave much to be desired. I've also toyed with Espresso, which is interesting...but meh.
What JavaScript libraries or frameworks do you use?
I use both jQuery and Prototype, depending on the project's needs. To illustrate each respective framework's strengths, I like to refer to jQuery as a DOM manipulation framework and Prototype a scripting framework. Accordingly, I tend to use jQuery on projects which focus on markup and Prototype on more heavily-scripted, application-type projects.
Do you use any of the languages that compile to JavaScript (GWT, haxe, Objective-J)?
Absolutely not - I have philosophical gripes with such frameworks. Unlike server-side code, front-end code is being run in the user's browser, in an environment that you cannot control. As such, I see it to be a JavaScript developer's responsibility to produce the best code possible. Suboptimal code can have performance ramifications, and the JavaScript compiled by languages like Objective-J (which is the only one from your list that I've used) will never be as tight as code produced by a strong JavaScript developer.
What unit test frameworks do you use? How do you invoke them? Can they be invoked from your editor/IDE, from the command line, from the browser in a web page, from your JavaScript debugger?
I'm a huge fan of QUnit, the jQuery unit testing framework. Dojo's DOH Unit Testing is also nice.
Don't miss FireUnit, a nifty Firebug extension for unit testing.
Also see Razor.
What automated user interface testing tools do you use (such as Selenium, Watir, Sahi)? Again, how can these be invoked? (Being able to invoke unit tests and interface tests from the command line would be very useful, for running buildbots)
When necessary I use Selenium, but this is rare.
What other code quality tools do you use (JSlint, code coverage tools, or anything of the sort)?
I use and love JSLint.
Firebug has a nice code coverage extension, and HRCov is widely considered to be the best of breed. I don't find much use for code coverage in most of my day-to-day JavaScript work.
What do you use for your debugging environment (Firebug, WebKit inspector, etc)? Does it have any integration with your editor or IDE?
As far as I'm concerned, Firebug is the killer app for JavaScript development. Some useful debugging features:
- Variable tooltips
- Breakpoints and conditional breakpoints
- Performance profiler
- An extremely nifty console API
- Watch expressions
- Stack traces
- Useful plugins like Jiffy, FireCookie, and FireQuery.
WebKit Inspector is nice, as is DragonFly, and Debug Bar is useful for tracking down IE bugs...but FireBug is the one for me.
What post-processing do you run on your code before deploying it (obfuscators, minifiers, any kind of optimizers)?
I very intentionally do not use any post-processing tools -- one of the great aspects of JavaScript is its openness, and I'd hate to make it more difficult for fledgling JavaScript developers to learn from my work. Not to mention that it's extremely simple to reconstruct obfuscated JavaScript.
There has only been one instance where I've needed to minify JavaScript to save bandwidth. In that case, I set up an SVN post-commit hook to run Doug Crockford's excellent JSMin.
Are there any other essential tools in your toolchain (which are specific to JavaScript development for browser based applications; I already have a perfectly good version control system, bug tracker, etc)?
- The
alert()
function ;) - Also, a nice JSON validator is useful.
- Visual Event is useful for event debugging
- jsfuzzer, for fuzzing
- I've not needed to use it, but Crosscheck is in my toolkit.