Creating Dynamic Web Experiences Drupal 7's AJAX API

As the functionality gap between native and web applications shrinks, users are expecting a more fluid experience when interacting with Drupal sites. Using an AJAX powered interface, users can use your site without having to wait for full page reloads - a much better user experience. Historically, AJAX code can be pretty difficult to work with. Since code resides on both the server- and client-side, there are a lot of moving parts between PHP and JS. Drupal 7's AJAX API, on the other hand, does an excellent job of simplifying the process for Drupal developers.

In this session, attendees will learn the basics of the Drupal 7 AJAX API. We'll start by briefly reviewing what AJAX is. Then we'll overview how Drupal's AJAX system works. Once the attendees have the necessary background information, the session will launch into 2-3 practical examples depending on the amount of time.

  1. The first example will demonstrate AJAX-enabled links created using views. The content will be similar to this simple example.
  2. The second example will demonstrate how to put together AJAX-enabled forms. As a simple starting point, a preview image of a selected node reference will be shown via AJAX. Then, the example will show how to add pieces to the form conditionally based on the user's input.
  3. Time permitting, a third example will show how to use the ctools module's modal windows.

To close the session, participants will learn a bit about the changes to the D7 API for D8.

The session will assume some module development experience but not much. Concepts like Drupal's Form API and hook_menu() will be discussed briefly.

Tweets About My Similar Session @ DrupalCampMA:
https://twitter.com/mikemiles86/status/292736231756939264
https://twitter.com/shaisachs/status/292729872508395520

Slides: 
Schedule info
Status: 
Proposed
Session Info
Speaker(s): 
Track: 
Coding + Development
Experience level: 
Intermediate