11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

www.it-ebooks.infoC H A P T E R 22• • •Creating Ajax-enhanced Featureswith jQuery and <strong>PHP</strong>For years, web developers complained about the inability to create sophisticated, responsive interfacesresembling anything like those found within desktop applications. That all began to change in 2005,when user experience guru Jesse James Garrett coined the term Ajax 1 while describing advances cuttingedgewebsites such as Flickr and Google had been making that closed the gap between web interfacesand their client-based brethren. These advances involved taking advantage of the browser’s ability toasynchronously communicate with a server—without requiring the web page to reload. Used inconjunction with JavaScript’s ability to inspect and manipulate practically every aspect of a web page(thanks to the language’s ability to interact with the page’s Document Object Model, also known as theDOM), it became possible to create interfaces capable of performing a variety of tasks without requiringthe page to reload.In this chapter I’ll discuss the technical underpinnings of Ajax and show you how to use thepowerful jQuery (http://jquery.com) library in conjunction with <strong>PHP</strong> to create Ajax-enhanced features.I’ll presume you already possess at least a rudimentary understanding of the JavaScript language. Ifyou’re not familiar with JavaScript, I suggest spending some time working through the excellentJavaScript tutorial located at http://w3schools.com/js. Additionally, because jQuery is a library with vastcapabilities, this chapter really only scratches the surface in terms of what’s possible. Be sure to consultthe jQuery website at www.jquery.com for a complete overview.Introducing AjaxAjax, an abbreviation for Asynchronous JavaScript and XML, is not a technology but rather an umbrellaterm used to describe an approach to creating highly interactive web interfaces which closely resemblethose found within desktop applications. This approach involves integrating a symphony oftechnologies including JavaScript, XML, a browser-based mechanism for managing asynchronouscommunication, and usually (although not a requirement) a server-side programming language whichcan complete the asynchronous requests and return a response in kind.1www.adaptivepath.com/ideas/essays/archives/000385.php437

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!