22

I am interested in doing some projects that involve heavy use of JavaScript. Namely HTML5 based canvas games, potentially using node.js as well. I am interested in learning modern best practices, tools and resources for JavaScript.

JavaScript is tough to research because you end up wading through a lot of really outdated material, hailing from the times that "JavaScript" was a four letter word.

If you are heavily involved in JavaScript programming...

  • What text editor or IDE do you use?
  • What unit testing framework do you use?
  • Do you use Selenium, or something else?
  • What other tools do you use?
  • What communities exist that discuss recent advents in JavaScript?
  • What books do you read/refer to?
  • What blogs do you read?

10 Answers10

19

My list would be:

Books are outdated as soon as they hit the shelves (typically).

RDL
  • 1,069
  • 7
  • 10
9

What text editor or IDE do you use?

All have support for complete web app development features (javascript, HTML, CSS etc). Choose Aptana, if you are looking for freeware solution.

What unit testing framework do you use?

  • Selenium

    1. Has multi browser supoort [ IE, Firefox, Chrome, Safari, Opera and Konqueror ] on multiple platforms [Windows, Linux, Macintosh etc.].
    2. Support for many programming languages to write test cases [HTML, Java, C#, Perl, PHP, Python, Ruby etc.].
    3. Remote execution (test cases reside on one machine and execution on browser can happen in a different machine).
    4. You can run regressions even in browser minimized mode also

What other tools do you use?

  • Firebug, IE Dev Tool Bar etc, browser in-built tools for debugging
  • You can Use some UI Library frameworks like JQuery, YUI, ExtJS etc for quick development.
  • Fiddler/HTTP Watch for debugging HTTP request and responses.
  • JSLint to verify some javascript syntax issues.
  • YUICompressor for minification of HTML, CSS and Javascript code.
  • DynaTrace/YSlow/Page Speed - for performance testing
  • sIEve for detecting memory leaks
  • IE Tester for testing your application on different IE versions.

What books do you read/refer to?

More

Dhanunjai
  • 376
6

I still feel like the tools available for serious JavaScript development are way behind where they should be but here are a few of the one's that I use.

  • For development I use VIM but you might find netbeans worth a try.
  • For unit testing jasmine is good but not perfect.
  • EnvJs can give you a nice way of running your unit tests on the command line
  • I highly recommend the webdriver part of selenium 2
  • The full google closure suite is very useful
  • I'd also recommend you know how to use google chrome and IE for debugging along side firebug as they all have their idiosyncrasies that can send you down all sorts of blind alleys.
  • There are some excellent libraries for JavaScript that are pretty much essential for serious development. I'd recommend you start with jQuery but there are plenty of others that are as good.
  • also jQuery's author John Resig has a useful blog
Duncan Grant
  • 101
  • 1
  • 3
5

Well... although far from complete, I am currently the lead developer for a new cross-platform open source project:

JS Studio

Here is a screenshot:

Some of the features are more complete than others... but here are the intended goals:

  • Syntax highlighting (pretty much complete)
  • Project organization (partially implemented)
  • Auto complete (including completion for common JS frameworks like jQuery, etc.)
  • Build system (for combining files, minification, etc.)
  • Extensible GUI (via JavaScript extensions)
  • Line numbering (sort of complete), word-wrap, configurable colors for syntax highlighting

I have set up daily builds for Windows and you can find the most recent build here: http://files.quickmediasolutions.com/jsstudio/

4

In the category 'other tools', i use CoffeeScript (a language that compiles to JavaScript), because it takes away the pains Javascript's syntax imposes on me.

list.sort (a, b) -> a.isSmaller(b)

versus

list.sort(function(a, b) { return a.isSmaller(b) });

One could argue, technically that is not javascript anymore, but the "feeling" of coffescript is, that it is just a thin layer.

keppla
  • 5,210
  • 26
  • 32
3

The API for the jQuery library http://api.jquery.com/ and a well thumbed, highlighted copy of jQuery In Action. Read it cover to cover and then follow http://twitter.com/jquery to get the updates in the new releases.

You've said books get out of date, but you'll need to get a baseline level of knowledge to build on, then once you're up to speed, keep up to date.

Qunit for unit testing and Firebug and a JavaScript syntax highlight for Firebug for debugging.

gbjbaanb
  • 48,749
  • 7
  • 106
  • 173
StuperUser
  • 6,163
2

What communities exist that discuss recent advents in JavaScript?

Most things have been covered but no-one mentioned

Raynos
  • 8,590
0

Hopefully won't get flamed too much for this, but if things like IDEs and tooling are important to you, then I strongly recommend looking at Google Web Toolkit. You write your code in Java in Eclipse, which really helps write your code. It provides highly effective code completion, refactoring utilities and help to debug and navigate through your codebase.

You can still go into raw Javascript when you need to.

Your code then gets compiled into optimised, minified JS. I have used this approach successfully in a node.js-like DOMless JS environment.

For HTML5 games, check out PlayN which is a library that uses GWT for exactly that.

funkybro
  • 867
0

I do a lot of JavaScript development. A lot of these are mentioned but, here is what I use:

  • Notepad++
  • Firebug
  • IE debugger (F12) and Chrome debugger (F12 on Windows)
  • I use Stack Overflow mainly for questions. Coming here has proven helpful as well.
  • The first book I used was JavaScript: The Definitive Guide way back when. Currently I don't use books as much as I use sites like MDN or MSDN docs.
  • We use some jQuery in places where it makes our life easier as well.
  • For unit testing we build our own test harnesses.
Corv1nus
  • 933
0

I can recommend the JavasScript Weekly newsletter. It's

A free, once–weekly e-mail round-up of JavaScript news and articles.

I haven't read John Resig's books, but I have heard and read good feedback. His new book Secrets of the JavaScript Ninja will be published soon.