Code Snippets: AJAX: Posts

60 More AJAX Tutorials from Max

via Ajaxian (where else?):

In a follow-up to this popular post from Max Kiesler, he’s collected 60 more Ajax tutorials from all around the web and for developers of all skill levels.

Among those on the list this time, there’s things like:

  • AJAX Chat Tutorials
  • AJAX Client-Server Communication Tutorials
  • AJAX Forms and Autocomplete Tutorials
  • AJAX Activity Indicator Tutorials
  • AJAX General Tutorials

Under most of the category headers, there’s a few different tutorials listed, with the added benefit of coming at things from more than one perspective. Of course, again, he doesn’t claim to have a comprehensive listing of these tutorials (I don’t think that’s even possible), so any additions you might want to make to the list are always appreciated.

Catching users JavaScript errors in your server logs

I think this is something we should seriously consider here at CNET.

via Ajaxian:
Markku Uttula admitted to coding while drunk and decided to write a little hack that captures JavaScript errors and sends them to his web server log using Ajax.

Would you want to do this? Maybe as part of a usability testing framework?

Implementation

He has one PHP file that does both the error writing, and also acts as the script xsrc= to capture errors:

window.onerror = function (msg, url, lno) {
ajax call back to the server log …

Quirky.

Suggested Reading: JSON vs. XML, cross domain scripting, and more

I’ve been working on a little project that involves creating some tools for any of CNET’s sites including our back end tools. I’ll post more on the project when it’s presentable, but in the process of working on this I have, of course, run into questions about cross domain security brick walls and how to transport portions of the data to create a consistent and persistent experience for the user.

Here are a couple of articles that I’ve found that I think could be useful:

Mashup Data Formats: JSON versus XML
This is a nice article outlining from a fairly objective perspective the differences between these two data formats/transport systems. They both have advantages and disadvantages, but it’s helped me understand when to use one vs. the other and how to get around certain problems by making the right choice at the right time.

The Case For JSON: What Is It and Why Use It?
Another article on why to use JSON that’s a little more detailed. This fellow definitely has his mind made up, so he’s not really going into xml’s positive aspects so much, but he does a great job of shining a light on JSON.

Look Ma, Cross-Domain Scripting!
Same author as the previous link but focused on one of JSON’s biggest assets: it’s ability to get across domains. It’s tricky stuff, and it’s not clear to me how to make the data go both ways (to and from a foreign server), but it has some useful code snips and demonstrations on how do do some of it.

Prototype Primer

via Ajaxian; new to Ajax? want to use Prototype to handle all the work? Read on!

If you’re just starting off in the vast world of Ajax, you might be wondering why so many people are using something as difficult as a manual XMLHttpRequest connection. Of course, Ajax wouldn’t be as wide-spread as it is if everyone had to write all of that code out by hand each time. Enter one of the most popular Javascript libraries out there, complete with Ajax support - Prototype. Never used it? Well, here’s a handy article to help get you up to speed. | Read the rest »

Categories

Archives

Links and whatnot