1. Technology

Tools for Making JavaScript

Editor and Browsers


The first tool that you need to write JavaScript is a plain text editor (or at least an editor capable of saving what is typed into it as plain text). If you are using Windows then Notepad is an appropriate choice. On the Mac you could use Simpletext. Linux of course provides lots of plain text editors many of which are probably installed on your system so you just need to choose your favourite one.

If you want to get a bit fancier than a plain text editor then check out the options available in your web editor. Many of them can be used to enter JavaScript as plain text in the same way that they can be used to enter HTML as plain text. Using this option to write and edit your JavaScript will probably have at least one advantage over the plain text editors that come with your operating system in that the editor can probably recognise JavaScript and so is able to colour code the JavaScript that you write using different colours to indicate JavaScript keywords, built-in objects and string content making it much easier to see if you accidentally omit a closing quote or similar from your code which otherwise may take a long time to find.

The other type of program that you need in order to write your own JavaScripts is web browsers to test them in. By web browser I don't just mean using whichever version of Internet Explorer that came preinstalled on your Windows Operating System or whichever version of Safari came preinstalled on your Mac. To ensure that as many as possible of your visitors will see the web page the way you intend it to look with the javascript functionality in place you need to test the Javascript in at least three different web browsers.

There are actually four different groups of web browsers that are used by enough people to make them worth testing. Internet Explorer is still built on the antiquated Trident rendering engine, Firefox, Netscape, and Mozilla are built on the Gecko rendering engine. Opera is built on the Presto rendering engine, and Safari and Konqueror use the KHTML rendering engine. Basically the rendering engine forms the core of the browser that controls the way that the browser converts HTML, stylesheets, and Javascript into interactive web pages. Those browsers that use the same rendering engine will perform in basically the same way when it comes to processing your code (assuming of course that they are running the same version of the rendering engine). Browsers that use a different rendering engine may behave differently when they process exactly the same code. For this reason the ideal minimum setup for testing your web pages would be to test on one browser that uses each of the four different rendering engines (testing on multiple versions is better but would take longer for progressively less benefit in most instances).

So why did I say three browsers when there are four different rendering engines. The problem is that while you can test with all four on Windows (which supports Internet Explorer, Firefox, Opera, and Safari - as well as many other browsers) there is no way to test all four if you use a Mac or Linux.

Since the demise of Internet explorer on the Mac back in 2003 (which in any case did not use Trident) there has been no version of Internet Explorer that runs on any operating system except Windows. In any case Trident itself is so closely embedded into Windows itself that it cannot be used on any other operating system anyway. This means that say Firefox, Opera, and Safari on a Mac or Firefox, Opera, and Konqueror on Linux would be the three browsers you can test with and you have to rely on someone with access to Windows to test it in Internet Explorer for you.

Internet Explorer runs JScript while the other browsers run JavaScript. Also, the other web browsers also follow the standards much more closely than Internet Explorer does so the best plan of attack when writing and testing a JavaScript is to test in any browser other than Internet Explorer first. Continue testing in whatever other browsers you have available apart from Internet Explorer until you are sure that your JavaScript works. Only then should you test on Internet Explorer and make any changes necessary to the code to allow it to function as both JavaScript and JScript. Test your script as thoroughly as you can before uploading it to your site and then test again to make sure that it uploaded correctly.

  1. About.com
  2. Technology
  3. JavaScript
  4. Javascript Tutorials
  5. Tools for Making JavaScript

©2014 About.com. All rights reserved.