D. Where to Learn More

Once you’ve worked through this book, you should be well on your way to spicing up your Web sites with JavaScript. But there’s a lot more to learn about the JavaScript language, and you’ll probably have questions as you write your own code.

The best place to get those questions answered is online, as you might expect. There are many resources on the Web that can help you deepen your understanding of JavaScript.

In this appendix, we’ll point you to several of the most helpful JavaScript-oriented Web sites, and we’ll even mention a few other books that we found helpful.

But first, a gentle reminder: the Net is not a static, unchanging place. Web sites can and often do change the addresses of their pages, so it’s possible that the URLs we list will become out of date by the time you use them. We’re just reporting the URLs; we have no control over them. Sometimes, entire Web sites disappear. If you find a link that’s become stale, check our companion Web site at www.javascriptworld.com to see if we have posted a new location for the page you were looking for.

Finding Help Online

The original JavaScript documentation is found at Mozilla’s Web site, but there’s a lot of good information at sites from Microsoft and at independent JavaScript pages as well. Here are some of the best:

Browser vendors

Since Netscape developed JavaScript, it’s no surprise that the Mozilla project, the open-source creators of Mozilla and Firefox (the successors to Netscape’s browser), has lots of great information about the language and further development.

JavaScript Center

http://developer.mozilla.org/en/javascript

This site is designed for all levels of JavaScript users and includes links to tools, documentation, and online communities Image. The documentation includes the Core JavaScript Reference (covering JavaScript 1.5), which gives you a rundown on the basics of the language, and definitions and explanations of the concepts used in JavaScript. It suffers from a moderately geeky difficulty level and sketchy examples, but you should be able to puzzle it out once you’ve digested this book. Also found here are the Core JavaScript Guide and explanations of what was added in JavaScript from versions 1.6 on.

Image

Image Mozilla’s JavaScript section of their Developer Center is a good place for you to start furthering your knowledge of JavaScript.

Venkman Debugger

http://developer.mozilla.org/en/venkman

When you need to debug your JavaScript, it certainly would be nice to have a good tool to use to help you. Wish no longer; Venkman, the JavaScript debugger from the Mozilla project, is a pretty good tool that works with Firefox, Thunderbird, and Mozilla, and it allows you to step through your code, setting breakpoints, inspecting objects and variables as the script executes, and working with JavaScript source code.

Mozilla Hacks—the Web developer blog

http://hacks.mozilla.org

The blog itself says that it “is here to highlight leading edge stuff that people are doing with Mozilla Firefox and the open Web”—and that’s just what it does.

Microsoft’s JScript Language

http://msdn.microsoft.com/hbxc2t98.aspx

Microsoft’s own version of JavaScript—called JScript—has its own pages on the Microsoft Developer Network site Image, where you can learn about its similarities to (and differences from) Mozilla’s JavaScript. You’ll find a detailed JScript Language Reference and the JScript User’s Guide.

Image

Image Microsoft’s Windows Script Technologies page gives you the lowdown on JScript, Microsoft’s variant of JavaScript.

Surfin’ Safari

http://webkit.org/blog/

This site Image isn’t just about JavaScript, but it is all about Apple’s Safari browser and its WebKit rendering engine—which aren’t just for the Mac anymore. Here’s where you can get information straight from Apple employees about what the next versions of Safari will and won’t do. You’ll also find downloadable nightly builds of WebKit, giving you features long before Apple ships them to the public.

Image

Image To learn the latest about Safari (on Mac, Windows, or iPhone), you want to go Surfin’ Safari.

Weblogs, elsewhere

There are many weblogs devoted to JavaScript; here are a couple of our favorites, but they by no means form an exhaustive list.

Ajaxian

http://ajaxian.com

This is a good blog with news, lists of JavaScript and Ajax resources, podcasts with JavaScript and Ajax luminaries, and much more Image. It has sometimes gotten a bit breathless over the fabulousness of Ajax, making you think that it’s the cure for cancer and a terrific dessert topping all rolled into one, but the blog’s perspective has mellowed over time. It used to have a bad habit of being a little confused about what Ajax actually is (no, Flash is not any part of Ajax); but over time they’ve learned a little more about that as well. And it’s a great site to find out who’s doing cool user interface tricks.

Image

Image The Ajaxian blog is a good destination for JavaScript and Ajax news and information.

QuirksMode

http://www.quirksmode.org/blog/

Peter-Paul Koch is a JavaScript developer in the Netherlands. The best thing about his site Image is that he keeps it amazingly up-to-date with the latest news about browsers and their JavaScript capabilities. It’s not a tutorial site, but along with the blog there is a great deal of basic information that will be helpful to the beginning scripter.

Image

Image Peter-Paul Koch’s QuirksMode site often has JavaScript information well ahead of any others.

Offline Resources

Books

Though the authors would naturally like to think that the book you’ve got in your hands is all you’ll ever need to become a JavaScript expert, they recognize that you might just want a bit more information after you’ve eagerly devoured this book. There are approximately a zillion JavaScript books on the market; here (in no particular order) are some of the books that we think are the best.

JavaScript, The Definitive Guide

Written by David Flanagan and published by O’Reilly Media, this is an exhaustive reference to the JavaScript language. Not for the faint of heart, this is where the experts turn to look up those weird operators and nail down that odd syntax. After a lengthy wait, the sixth edition of this book has finally arrived, bringing its knowledge base up to date.

ppk on JavaScript

Peter-Paul Koch is one of the acknowledged masters of JavaScript. In this book from New Riders, he uses real-world script examples he created for paying clients to take you through a journey that is both theoretical and practical.

Pro JavaScript Techniques

John Resig (of jQuery fame) wrote this book to help intermediate-level JavaScripters become advanced scripters. Not for the novice, it’s a good book to take you onwards from where this book ends.

Videos

Given that this is, after all, a book with the word Visual in its name, it’s not surprising to us that some readers prefer a more visual method of learning. Here are two video training resources we like because, well, we made them. Both are available via streaming video and as CDs from www.lynda.com.

JavaScript Essential Training

Some of what’s in this course may seem familiar, as JET and the book you’re holding right now had common origins. It’s a good way to start learning the basics in a video tutorial format.

Ajax Essential Training

Picking up where JET left off, AET goes beyond the basics and into intermediate-level scripting.

Troubleshooting Tips

When you first start writing code, it may feel like you’re running into trouble with every line—but happily, there are many online resources to help you through that rocky beginning. Here are some of our favorites.

The missing add-ons

Firebug Debugger

http://getfirebug.com

If you like Mozilla’s Venkman (or even if you don’t), you’ll love Firebug Image. You can use it with Firefox to debug not just your scripts, but your HTML and CSS as well. It’s free, with good documentation, handy logging, and all the breakpoint and DOM support you could want.

Image

Image Firebug, an add-on to Firefox, gives you an extraordinary amount of control and a lot of ways to examine your code.

If the only thing missing to make your (scripting) life complete is similar functionality for IE, Safari, and Opera, then you need to check out Firebug Lite at http://getfirebug.com/lite.html Image. It doesn’t have all the functionality of its big brother, but it’s very handy to have a single common interface when trying to track down a random bug.

Image

Image If you aren’t running Firefox, you can still run Firebug Lite—shown here inside Safari on the same page as Image.

JSHint

http://jshint.com

If you’re like us, the first thing you do if you have trouble with HTML and CSS is run to a validator. If you’ve wished for something similar with JavaScript, you may have heard of JSLint, a code-checking tool. And if, like us (and many other JavaScript developers), you found that JSLint just wasn’t designed for real-world use, then what you want is JSHint. It’s designed both for checking code and for flexibility, and it has none of JSLint’s “my way or the highway” rigid enforcement.

Online pastebins

Ever wish you could use your browser not just for testing your code, but also for writing it—after all, why should you have to keep toggling back and forth? That’s part of what pastebins are all about—the ability to write and run in the same window.

The other handy benefit is being able to save your files and show them to other people (that is, you have something to point to while yelling for help). And even better—they can make changes to your code as well, helping you to find and fix those sneaky bugs.

There are numerous pastebin sites online, some of which support HTML, CSS, and JavaScript. Here are two we (and others) like:

JSBin

http://jsbin.com

JSFiddle

http://jsfiddle.net

Getting help online

So there you are, trying to track down a JavaScript problem, and you do what you normally do: put your problem into Google and see what it suggests. And somehow, you find that when it comes to code, the same site keeps being suggested over and over Image:

Image

Image Yes, this is a real screenshot of Google search results. So yes, when searching for JavaScript code help, you really are likely to find yourself at Stack Overflow.

Stack Overflow

http://stackoverflow.com

If you spend enough time coding, you’ll find Google sending you here often. And then you’ll find yourself returning without stopping by Google first. And then you’ll find yourself answering other people’s questions while you’re getting help on your own.

You can browse the site by tags (such as javascript or jquery) Image or just put your problem in the search box. Chances are good that your question has already been asked and answered; if not, click the Ask Question button and give a thorough description.

Image

Image With over 100,000 questions on JavaScript, there’s a good chance yours has already been asked and answered.


Tip

One of the co-authors of this book (Dori) found herself spending enough time on the site that she took the next step and applied there for a job—but we don’t expect everyone to be that enthusiastic. However, if you do find Stack Overflow useful, keep an eye out for user Dori ♦, who is now a community manager and technical evangelist for Stack Exchange (Stack Overflow’s parent company).


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.11.247