PHP and AJAX in 2 easy steps.
IBM has done it again. Their Developerworks site has published a 2 part textbook primer on getting started with AJAX from the perspective of a PHP developer. Written by Sean Kelly (Part 1) and Mike Britton (Part 2) of ID Society, these 2 articles introduce you to the magical, buzz-word laden world of AJAX. (The articles aren’t buzz-word laden but the landscape is.)
Part 1 Getting Started walks you getting setup and building a simple photo album using PHP and the SAJAX toolkit. Sean does a great job at keeping it simple and focused. Aside from the sidebar on “The OpenAjax Alliance” (Disclaimer:Zend is a member but I’ve yet to receive my robes and secret decoder ring) the entire article is focused on simply getting you going with SAJAX.
The demo application, a photo album, is typical of tutorial demo code, simple, cute to look at but not really useful in the real world. However, it does serve to give Sean the room he needs to explore the concepts. Typical of a photo album, you have “pager tables” single image pages and navigation elements to let you flip back and forth through your scenic pictures of random landscapes or last years vacation with the in-laws. It’s a good example of using a known metaphor to explain new concepts and Sean works it masterfully.
In Part 2 Back, Forward, Reload, Mike talks about an issue that has been a thorn in the side of web developers since way back in the early days of AJAX, those darn Back, Forward and Reload buttons on the browser. His solution, while not a concrete answer to the problem, is a good sidestep. He shows you how to create your own Back, Forward and Reload buttons within your application. He dives deep into the hows and whys of this concept and code flows liberally.
Put the two together and you’ve got a weekend’s worth of fun and frolicking in front of your keyboard. If you are new to AJAX, trying to expand your horizons or are just dying to build your own photo album, this is an excellent set of tutorials.







