E-book details

AJAX and PHP: Building Responsive Web Applications. Enhance the user experience of your PHP website using AJAX with this practical tutorial featuring detailed case studies

AJAX and PHP: Building Responsive Web Applications. Enhance the user experience of your PHP website using AJAX with this practical tutorial featuring detailed case studies

Mihai Bucica, Cristian Darie, Bogdan Brinzarea, Filip Chereches-Tosa, Philippe Wauthier

Ebook
Assuming a basic knowledge of PHP, XML, JavaScript and MySQL, this book will help you understand how the heart of AJAX beats and how the constituent technologies work together. After teaching the foundations, the book will walk you through numerous real-world case studies covering tasks you'll be likely to need for your own applications:

Server-enabled form-validation page
Online chat collaboration tool

Customized type-ahead text entry solution

Real-time charting using SVG

Database-enabled, editable and customizable data grid

RSS aggregator application

A server-managed sortable list with drag&drop support using the script.aculo.us JavaScript toolkit



The appendices guide you through installing your working environment, using powerful tools that enable debugging, improving, and profiling your code, working with XSLT and XPath.

From the Author, Cristian Darie AJAX and PHP: Building Responsive Web Applications is mainly a book for beginners, but when designing its contents we tried to find the ideal blend of topics that would help both novice and experienced web developers make a big step forward. One customer was very kind to let us know, through a review, that we succeeded:

The theory behind all the technologies used is very clearly explained, without boring you with details about obvious things. Right from the first chapter you start learning by examples. The examples can be easily adapted to many web projects and they cover stuff that is both useful and fun.
Here are a few examples of such useful and fun things that you can find in this book:



details on using proxy scripts to work around the security measures in modern browsers

client-side and server-side code that doesn't break when fed with special characters (such as <, , etc)

code that works efficiently with Internet Explorer 5, 6 and 7, Firefox, Opera, Safari, and others

a very quick introduction to SVG, the new rebel kid of the web (and of the house)

client-server communication based on message queues that guarantee that your messages aren't lost on the way, and arrive in the intended order at the destination

server-side state management techniques that use query string parameters and database records to keep track of your client's activity

simple yet effective error-handling structures that combine JavaScript code and PHP code to report when something bad happens on the client or on the server

a live errata page that is updated as soon as anyone reports a suggestion or a correction

a friendly AJAX tutorial and many case studies that teach you how to use JavaScript, PHP, MySQL and XML together in order to achieve wonderful results



The book's authors and the publisher are listening to your feedback, and appreciate when you invest some time to let them know what you think. The first result of this collaboration is an updated version of the AJAX Chat case study that uses (and teaches) JSON instead of XML. Find this new chapter in the code download or on my website.

Thanks for reading such a long message. Have fun! Cristian Darie.
  • AJAX and PHP
    • Table of Contents
    • AJAX and PHP
    • Credits
    • About the Authors
    • About the Reviewers
    • Preface
      • What This Book Covers
      • What You Need for This Book
      • Conventions
      • Reader Feedback
      • Customer Support
        • Downloading the Example Code for the Book
        • Errata
        • Questions
    • 1. AJAX and the Future of Web Applications
      • Delivering Functionality via the Web
        • Advantages of Web Applications
      • Building Websites Since 1990
        • HTTP and HTML
        • PHP and Other Server-Side Technologies
        • JavaScript and Other Client-Side Technologies
        • Whats Been Missing?
      • Understanding AJAX
      • Building a Simple Application with AJAX and PHP
        • Time for ActionQuickstart AJAX
          • What Just Happened?
      • Summary
    • 2. Client-Side Techniques with Smarter JavaScript
      • JavaScript and the Document Object Model
        • Time for ActionPlaying with JavaScript and the DOM
          • What Just Happened?
      • JavaScript Events and the DOM
        • Time for ActionUsing JavaScript Events and the DOM
          • What Just Happened?
      • Even More DOM
        • Time for ActionEven More DOM
          • What Just Happened?
      • JavaScript, DOM, and CSS
        • Time for ActionWorking with CSS and JavaScript
          • What Just Happened?
      • Using the XMLHttpRequest Object
        • Creating the XMLHttpRequest Object
          • Creating Better Objects for Internet Explorer
        • Initiating Server Requests Using XMLHttpRequest
        • Handling Server Response
          • Time for ActionMaking Asynchronous Calls with XMLHttpRequest
            • What Just Happened?
      • Working with XML Structures
        • Time for ActionMaking Asynchronous Calls with XMLHttpRequest and XML
          • What Just Happened?
        • Handling More Errors and Throwing Exceptions
        • Creating XML Structures
      • Summary
    • 3. Server-Side Techniqueswith PHP and MySQL
      • PHP and DOM
        • Time for ActionDoing AJAX with PHP
          • What Just Happened?
      • Passing Parameters and Handling PHP Errors
        • Time for ActionPassing PHP Parameters and Error Handling
          • What Just Happened?
      • Connecting to Remote Servers and JavaScript Security
        • Time for ActionConnecting to Remote Servers
          • What Just Happened?
      • Using a Proxy Server Script
        • Time for ActionUsing a Proxy Server Script to Access Remote Servers
          • What Just Happened?
      • A Framework for Making Repetitive Asynchronous Requests
        • Time for ActionImplementing Repetitive Tasks
          • What Just Happened?
      • Working with MySQL
        • Creating Database Tables
        • Manipulating Data
        • Connecting to Your Database and Executing Queries
          • Time for ActionWorking with PHP and MySQL
            • What Just Happened?
      • Wrapping Things Up and Laying Out the Structure
        • Time for ActionBuilding the Friendly Application
          • What Just Happened?
      • Summary
    • 4. AJAX Form Validation
      • Implementing AJAX Form Validation
        • Thread-Safe AJAX
          • Time for ActionAJAX Form Validation
            • What Just Happened?
      • Summary
    • 5. AJAX Chat
      • Introducing AJAX Chat
        • AJAX Chat Solutions
      • Implementing AJAX Chat
        • Time for ActionAjax Chat
          • What just happened?
      • Summary
    • 6. AJAX Suggest and Autocomplete
      • Introducing AJAX Suggest and Autocomplete
        • Google Suggest
      • Implementing AJAX Suggest and Autocomplete
        • Time for Action;AJAX Suggest and Autocomplete
          • What Just Happened?
      • Summary
    • 7. AJAX Real-Time Charting with SVG
      • Implementing a Real-Time Chart with AJAX and SVG
        • Time for ActionBuilding the Real-Time SVG Chart
          • What Just Happened?
      • Summary
    • 8. AJAX Grid
      • Implementing the AJAX Grid Using Client-Side XSLT
        • Time for ActionAJAX Grid
          • What Just Happened?
      • Summary
    • 9. AJAX RSS Reader
      • Working with RSS
        • The RSS Document Structure
        • Google Reader
      • Implementing the AJAX RSS Reader
        • Time for ActionBuilding the RSS Reader Application
          • What Just Happened?
      • Summary
    • 10. AJAX Drag and Drop
      • Using Drag and Drop on the Web
        • Shopping Carts
        • Sortable Lists
      • Building the AJAX Drag-and-Drop Sortable List Application
        • Time for ActionTask Management Application with AJAX
          • What Just Happened?
      • Summary
    • A. Preparing Your Working Environment
      • Preparing Your Windows Playground
        • Installing Apache
        • Installing MySQL
        • Installing PHP
      • Preparing Your *nix Playground
        • Installing Apache
        • Installing MySQL
        • Installing PHP
      • Installing phpMyAdmin
      • Preparing the AJAX Database
    • Index
  • Title: AJAX and PHP: Building Responsive Web Applications. Enhance the user experience of your PHP website using AJAX with this practical tutorial featuring detailed case studies
  • Author: Mihai Bucica, Cristian Darie, Bogdan Brinzarea, Filip Chereches-Tosa, Philippe Wauthier
  • Original title: AJAX and PHP: Building Responsive Web Applications. Enhance the user experience of your PHP website using AJAX with this practical tutorial featuring detailed case studies
  • ISBN: 9781904811237, 9781904811237
  • Date of issue: 2006-03-10
  • Format: Ebook
  • Item ID: e_3cx4
  • Publisher: Packt Publishing