In the first chapter, I mentioned two key technologies that contributed to JavaScript's rise from a toy language to an application language. So far, we have made use of dynamic page reflowing (the ability to change what the page looks like without reloading the page), which is the first key technology.

We will now focus on the: JavaScript's ability to pull data from the server, which is the second key technology.

For better or worse, this methodology is usually called AJAX, (Asynchronous JavaScript And XML). We will talk about the family of tools typically grouped under the AJAX title and see how these tools can be used in Drupal.

In this chapter we will:

• Introduce the AJAX family of tools

• Use jQuery's built-in AJAX support to get content from Drupal

• Fetch existing XML content from Drupal

• Use additional Drupal modules to expose more data to AJAX

• Use JSON (JavaScript Object Notation) as a JavaScript-friendly way of sending data from Drupal

As you may have noticed, our earlier chapters were heavy on explanation. Projects were used to simply illustrated the main points. Gradually, projects have gotten bigger, and the explanatory text has taken up a secondary role. In this chapter, we will spend most of the time looking at code and creating projects. First, we will have a quick overview of AJAX and how it fits into the Drupal landscape.

Was this article helpful?

0 0

Post a comment