I am looking to start writing a sophisticated application in JavaScript to run on the web. I've written little bits of throwaway code in JavaScript before, using the DOM directly and a little bit of jQuery. But this is the first time I'm looking to write a full-fledged application to run in the browser.
So, I'm wondering what toolchains people prefer for doing serious development in JavaScript. In particular, I'm interested in the following, along with some information about why you chose the components you did and how they all fit together into your workflow:
- 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. - Do you use any sort of IDE (Aptana, Dashcode, or the like)?
- What JavaScript libraries or frameworks do you use?
- Do you use any of the languages that compile to JavaScript (GWT, haxe, Objective-J)?
- 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?
- 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)
- What other code quality tools do you use (JSlint, code coverage tools, or anything of the sort)?
- What do you use for your debugging environment (Firebug, WebKit inspector, etc)? Does it have any integration with your editor or IDE?
- What post-processing do you run on your code before deploying it (obfuscators, minifiers, any kind of optimizers)?
- Do you have any sort of tools for managing module dependencies or dynamically loading code as it's needed? The application I'm writing will be working with a large amount of code, and I would like to keep load times down, so tools for tracking what modules are needed or loading code on demand would be helpful.
- 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)?
I'm less interested here in lists of "here are a bunch of things you could use" (I know of a lot of the tools that are available), and more in the stack that you actually use in practice and how it all fits together. I'm hoping to develop this primarily as a client side application, with the server just being used for authentication and to store and retrieve data, so I'm not interested in what server side framework you use, unless it is integral to the client side code in some way.
edit: I'm particularly interested in the unit and user interface testing frameworks, and how you automate them. I prefer to be able to run one single "make test" or "rake test" task from the command line to run all tests for the projects, and have it return a status depending on the success or failure of the tests. This would allow much easier integration with buildbots. Also, I'm interested if anyone writes unit tests that can be run outside of a browser (in Rhino, spidermonkey, v8, or the like) for code that don't depend on the browser, for faster turnaround on a subset of your tests.