AJAX In Action [283]
Licensed to jonathan zheng Installing Firefox extensions 587 Figure A.15 Firefox extensions can be installed from the Web, using a special downloadable archive format. All that remains is to close down all open Firefox windows (including DOM inspectors, debuggers, and so on), and restart Firefox. The extension is then ready to run, appearing as an option in the Tools menu (figure A.17). Firefox supports a large number of extensions, many of which are aimed at web developers. Not all extensions are hosted on the addons.mozilla.org site, but this is certainly the first port of call for such things. The installation procedure is generally similar for all extensions, including the Venkman debugger that we discussed earlier. This concludes our review of development tools for Ajax. We hope that it has provided you with some useful advice in getting your project off the ground. Figure A.16 Newly installed extensions are visible in the Extensions dialog immediately but won’t become active until the browser is restarted. Licensed to jonathan zheng 588 APPENDIX A The Ajax craftsperson’s toolkit Figure A.17 After you restart the browser, the extension is ready to use. A.6 Resources This chapter was all about tools. Here are links to those that we featured: ■ Textpad: www.textpad.com ■ jEdit: www.jedit.org ■ Eclipse: www.eclipse.org ■ Eclipse JavaScript plug-ins: http://jseditor.sourceforge.net/ ■ Visual Studio Express: http://lab.msdn.microsoft.com/express/ ■ Dreamweaver: www.macromedia.com/software/dreamweaver/ ■ Komodo: www.activestate.com/Products/Komodo/ ■ Venkman Debugger: www.mozilla.org/projects/venkman/ ■ Microsoft Script debugger: www.microsoft.com/downloads/details.aspx? FamilyID=2f465be0-94fd-4569-b3c4-dffdf19ccd99&displaylang=en ■ Charles: www.xk72.com/charles/ ■ Fiddler: www.fiddlertool.com ■ LiveHttpHeaders: http://livehttpheaders.mozdev.org/ ■ Modify Headers extension: https://addons.mozilla.org/extensions/moreinfo.php?id=967&vid=4243 ■ IEDocMon DOM inspector for IE: www.cheztabor.com/IEDocMon/index.htm Licensed to jonathan zheng JavaScript for object-oriented programmers 589 Licensed to jonathan zheng 590 APPENDIX B JavaScript for object-oriented programmers There are many routes into becoming a JavaScript programmer, ranging from graphic design to a serious programmer coming up from the business tiers. This appendix won’t aim to teach you how to program in JavaScript—there are already many good books and articles to help you do that. What I intend to record here are a few core concepts that will help Java and C# programmers make the leap to JavaScript programming in a relatively painless way. (The same is true to a lesser extent of C++ programmers, but C++ inherits a lot of strange flexibility from C, so that JavaScript should prove less of a shock to the system.) If you are a serious enterprise programmer with a grounding in OO design principles, then your first approaches to JavaScript may be overly influenced by your experience with languages such as Java and C#, and you may find yourself fighting against the language rather than working with it. I certainly did, and I’ve based this on my own experience as a programmer and in mentoring others along the same route. JavaScript can do a lot of clever things that Java and C# can’t. Some of these can help you to write better code, and some can only help you to shoot yourself in the foot more accurately! It’s worth knowing about both, either to make use of the techniques or to avoid doing them unwittingly. If you are coming to Ajax from a structured OO language such as Java or C++, then I