In this chapter we introduce tools and techniques that will make your development process more enjoyable with these tools and techniques. JSDoc can help build JavaScript code documents, making it easier for other developers to understand and use code. If you start using AJAX frequently, you'll certainly write some of your own reusable JavaScript libraries, and you'll use JSDoc to create documents for your code so that others can use them more easily.
Tools such as HTML validator and Checky can help you make sure that the HTML code you write is legitimate HTML. Illegal HTML can cause unforeseen behavior, so using legitimate HTML or XHTML can eliminate some of the factors that can cause errors. In addition, if XHTML or HTML is legitimate, it is more likely to behave the same on multiple browser platforms.
Packaged in Firefox and other Mozilla browsers provides a DOM Inspector tool that allows you to examine the nodes of an HTML document as a structured tree. DOM Inspector allows you to view each node and its property values, and even dynamically modify the property values. You can move a node dynamically from one position in the page to another without having to rewrite the HTML. DOM Inspector is useful if you want to check for dynamically created nodes through JavaScript.
JSLint is a JavaScript validation tool. Although it is not certain that JavaScript logic is correct, it does help to identify errors in language syntax and to find parts that may be wrong because of bad coding styles.
Deleting comment lines and carriage return breaks in JavaScript can greatly reduce the size of JavaScript files and, correspondingly, reduce the amount of time that JavaScript files are downloaded to the client browser. Memtronic's Html/javascript cruncher-compressor can not only remove comment lines and carriage return line breaks, but also really compress JavaScript code to speed up downloads. A good side effect of compression is that it makes JavaScript more difficult to read, helping to protect the inner work of JavaScript code and not being stolen by others.
The Firefox Web Development Expansion Pack provides a number of useful tools for Web developers. With these tools, you can resize the picture, dynamically edit the CSS style rules, change the form method from Get to post (or vice versa), and there are many more.
We have also introduced some advanced JavaScript technologies, such as object-oriented programming. First, you learned how JavaScript uses a prototype based mechanism to simulate inheritance. It then learned how JavaScript uses private properties that can only be accessed through public methods to support the concept of information hiding. Finally, we introduce techniques that allow JavaScript to simulate a class-based inheritance mechanism similar to the inheritance mechanism used in C + + and Java. This technique is a more natural coding style for those who are accustomed to a fully object-oriented language.
As Ajax developers, using these tools and techniques will make development easier and more enjoyable to work with. You can take all these tools and try to pick out the tools you like, and you may also run into other useful tools on the web.
Back to "Ajax Basics Tutorial-Directory"