Tools and Tips for Productive JavaScript Development

When it comes to develop with Javascript many experienced developers start to tremble. Just few weeks ago, speaking with a former Java Analyst friend, currenty Project Manager, told me that he get shocked when he realizes that some developers of his team were still using the terrible javascript alert() method to debug js code, instead of using, for example, Firebug. Obviously, alert() debugging has been a common practice in the past (although by this time you can also use Venkman debugger in Netscape), but now in 2009 it does not make sense.

When using firebug, you just need to type, console.log("test"), for example, to view in your firebug console panel the messages and tracings you need to check your code. Not only that, you are also able to set breakpoints in your javacript code, inspect HTML DOM tree, check the time needed by your application to load and much more.

Another important point that set back programmers form JS development is the absence of a good IDE with features such as intellisense, code completion, and so on. But now, you can use Netbeans, Eclipse, or VisualStudio to develop with javascript in the same way you do with any other programming language (almost).

An old common misconception when developing web applications was that is mostly suited to validate forms. This changes upside-down when Google started to use AJAX in Maps, and GMail. In this moment, JavaScript was taken seriously by developers. The problem is that, creating objects and using them is different form Java or C#. You need to master JavaScript skills to take advantage of the JS Object Oriented model. Nevertheless, even if you do not master this techniques you can also make use of a whole bunch of many different JS frameworks and APIs, such as jQuery, Dojo or Scriptaculus, just to mention a few of them.

So, if you are or are going to create web applications you have to take JS very seriously. Three tips:
  1. Use Firebug and a javascript friendly IDE
  2. Read something about JavaScript Object Oriented development
  3. Review some JavaScript APIs