Free Sample
+ Collection

PHP Ajax Cookbook

Milan Sedliak, R. Rajesh Jeba Anbiah , Roshan Bhattarai

Over 60 simple but incredibly effective recipes to Ajaxify PHP websites with this book and ebook
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849513081
Paperback340 pages

About This Book

  • Learn how to develop and deploy iPhone web and native apps.
  • Optimize the performance of Ajax applications.
  • Build dynamic websites with faster response from the server using the asynchronous call feature of PHP Ajax.
  • Using Ajax allows quick and efficient access of data from the server, thus precluding a total web page refresh.
  • Leverage the power of PHP Ajax using practical recipes with example codes.


Who This Book Is For

This book is an ideal resource for people who like to add Ajax features to websites and who prefer standards and best practices for building SEO-friendly websites. As the book covers advanced topics, readers need to be aware of basic PHP, JavaScript and XML features.

Table of Contents

Chapter 1: AJAX Libraries
Designing simple navigation using jQuery
Creating tab navigation
Designing components using Ext JS
Event handling in MochiKit
Building a tab navigation using Dojo
Building a chart application using YUI library
Loading dynamic content using jQuery slider
Creating an AJAX shopping cart using MooTools
Building an AJAX login form using prototype.js
Chapter 2: Basic Utilities
Validating a form using Ajax
Creating an autosuggest control
Making Form Wizards
Uploading a file using Ajax
Uploading multiple files using Ajax
Creating a five-star rating system
Building a PHP Ajax contact form with validation
Displaying a table in Ajax
Building Pagination using PHP and Ajax
Chapter 3: Useful Tools Using jQuery
Making tool tips using Ajax
Creating Autocomplete from a database
Building a tab navigation using jQuery
Rotating content
Creating an image slider
Creating pageless pagination
Loading images using Lightbox
Growing textarea using the jGrow plugin
HTML replacement of the select dropdown
Improving date selection with Datepicker
Drag-and-drop functionality
Ajax shopping cart
Sorting and filtering data
Adding visual effects and animations
Chapter 4: Advanced Utilities
Building an Ajax chat system using the Comet technique
Charting with JavaScript
Decoding CAPTCHA through canvas
Displaying data in a grid
Chapter 5: Debugging and Troubleshooting
Debugging with Firebug and FirePHP
Debugging with the IE developer toolbar
Avoiding the framework $ conflict
Using the anonymous function of JavaScript
Fixing memory leaks in JavaScript
Fixing memory leaks
Sequencing Ajax Requests
Cross Browser and Ajax
Beautifying JavaScript
Chapter 6: Optimization
Caching of objects
Getting optimization tips with YSlow
Speeding up JavaScript delivery through automatic compression and browser caching
Triggering JavaScript early/on DOM load
Lazy-loading of images
Optimizing Ajax applications automagically through Apache modules/Google mod_pagespeed
Chapter 7: Implementing Best Practices to Build Ajax Websites
Avoiding HTML markup-specific coding
Building secure Ajax websites
Building SEO-friendly Ajax websites
Preserving browser history or un-breaking the browser's back button
Implementing comet PHP and Ajax
Chapter 8: Ajax Mashups
Web services
Creating and consuming web services using PHP
Using Flickr API with Ajax
Using Twitter API with Ajax
Translating text using Google Ajax API
Using Google Maps
Searching a location within a Google Map
Searching within XX km. radius of Google Maps with markers and Info window
Finding a city/country using IP address
Converting currencies using Ajax and PHP
Chapter 9: iPhone and Ajax
Building a touch version of a website (with jQTouch)
Leveraging HTML5 features in iPhone Ajax
Building native apps with PhoneGap
Speeding up a PhoneGap project
Building a currency conversion hybrid app

What You Will Learn

  • Understand Basic form validation and form handling tools
  • Learn Debugging and troubleshooting techniques to make your site perform even quicker
  • Integrate Web 2.0 APIs for Flickr, Picasa, Facebook and Twitter
  • Build chat application using Comet technology
  • Write optimized code using Ajax asynchronous calls to improve website responsiveness
  • Implement best practices to build SEO-friendly websites
  • Become a skilled iPhone app developer using Ajax


In Detail

Ajax is the necessary paradigm in Web 2.0 sites. Most of the Web 2.0 sites are built with PHP and Ajax. Extending AJAX is about delivering front-end service for accessing back-end services in PHP in a quick and easy manner. With this book in hand, you will learn how to use the necessary tools for Ajaxification of websites and iPhones.

PHP AJAX cookbook will teach you how to use the combination of PHP AJAX as a powerful platform for websites or web applications. Using AJAX for Communication with Server leads to faster response with PHP at the back-end services. The combination of AJAX PHP has many features such as speeding up the user experience, giving your web client much quicker response time and letting the client browser retrieve data from the server without having to refresh the whole page. You will learn the nuances of optimization and debugging Ajax applications. Further, you will learn how to program Ajax on iPhone devices.

This book will teach you popular selector-based JavaScript followed by important concepts on debugging, optimization and best practices. There is a collection of recipes focused on creating basic utilities such as validating form using Ajax and creating a five star rating system. As jQuery is quite popular, useful tools and jQuery plugins like Ajax tooltips, tab navigation, autocomplete, shopping cart, and Ajax chat are covered subsequently. By the end of chapter 7 you will learn to visually speed up website responsiveness to building SEO-friendly Ajax websites. Also get to know about all popular Ajax webservices and APIs like Twitter, Facebook and Google Maps which are covered in Ajax Mashups. Finally, step-by-step recipes are presented to build iPhone apps using basic libraries and everyday useful Ajax tools.


Read More

Recommended for You